I am trying to get a OpenGL code run on Eclipse in Linux x86 environment (ubuntu): http://nehe.gamedev.net/tutorial/vertex_buffer_objects/22002/ The code would run properly after I input in the command line with
g++ main.cpp error.cpp lesson45.cpp -o lesson45 -L/usr/X11R6/lib/ -lGL -lGLU
sdl-config --cflags --libs
Which is the instruction from the make file.
Now I'm attempting to get the code run on Eclipse, I know I must set up linker libraries GL and GLU and linker library directory /usr/X11R6/lib/. However, with respect to sdl-config --cflags --libs
, I am not sure how to configure it within Eclipse.
Create a new C++ project (File > New > C++ Project). You will need to pick a toolchain - Linux GCC.
If you want to use C++11 do the following:
Configure Eclipse to use SDL2
This process has been tested and confirmed working although I don't take any credit for it. Information sourced from HERE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With