NOTE: OUTDATED. WILL BE UPDATED SOON
Compiling a Frontend project
There are many ways of doing C++ development in Linux. You could go hardcore and just use a terminal, or you could use an Integrated Development Environment (IDE) like Code::Blocks. (the later is recommended for newbies everyone)
Method A: Compiling the project from the terminal
To compile the source file main.cpp into the executable file demo, do the following:
- For CG:
gcc main.cpp -lfrontend2_fwg -lfrontend2graphics_cg_fwg -lfrontend2input_fwg -libfrontend2utils_fwg -lGL -lGLU -lXrandr -lXrender -lX11 -ljpeg -lpng -lfreetype -lCg -lCgGL -lpthread -lvorbis -lvorbisfile -lvorbisenc -o demo
- For GLSL:
gcc main.cpp -lfrontend2_fwg -lfrontend2graphics_glsl_fwg -lfrontend2input_fwg -libfrontend2utils_fwg -lGL -lGLU -lXrandr -lXrender -lX11 -ljpeg -lpng -lfreetype -lpthread -lvorbis -lvorbisfile -lvorbisenc -o demo
Method B: Setting up the project in Code::Blocks
- Create a new empty project and add your source files to the project
- Go to Project -> Build Options and select the top level item in the list of build targets to the left (should be named the same as your project). In the dropdown list below the compiler selection, select Linker settings and paste the following into the Other linker options-textbox:
- For CG:
-lfrontend2_fwg -lfrontend2graphics_cg_fwg -lfrontend2input_fwg -libfrontend2utils_fwg -lGL -lGLU -lXrandr -lXrender -lX11 -ljpeg -lpng -lfreetype -lCg -lCgGL -lpthread
- For GLSL:
-lfrontend2_fwg -lfrontend2graphics_glsl_fwg -lfrontend2input_fwg -libfrontend2utils_fwg -lGL -lGLU -lXrandr -lXrender -lX11 -ljpeg -lpng -lfreetype
- For CG:
- ?
- Profit