TheInfernoSin
Member #8,345
February 2007
|
I get an error when I try to compile this code: btw i stinalled AllegroGL threw DevCPP Updates/Packages Manager. 1 | #include <allegro.h> | 2 | #include <alleggl.h> | 3 | | 4 | void Init() | 5 | { | 6 | allegro_init(); | 7 | install_allegro_gl(); | 8 | install_keyboard(); | 9 | | 10 | set_gfx_mode(GFX_OPENGL_WINDOWED, 640, 480, 0, 0); | 11 | | 12 | glClearColor(0.0, 0.0, 0.0, 0.0); | 13 | } | 14 | | 15 | int main() | 16 | { | 17 | Init(); | 18 | | 19 | glClear(GL_COLOR_BUFFER_BIT); | 20 | glBegin(GL_POINTS); | 21 | glColor3f(1.0, 1.0, 1.0); | 22 | glVertex3f(0.0, 0.0, 0.0); | 23 | glVertex3f(0.5, 0.5, 0.0); | 24 | glVertex3f(-0.5, 0.5, 0.0); | 25 | glEnd(); | 26 | glFlush(); | 27 | | 28 | readkey(); | 29 | | 30 | return 0; | 31 | } | 32 | END_OF_MAIN(); |
error: 1 | Compiler: Default compiler | 2 | Building Makefile: "C:\Dev-Cpp\Makefile.win" | 3 | Executing make... | 4 | make.exe -f "C:\Dev-Cpp\Makefile.win" all | 5 | g++.exe -c allegroGL1.dev -o allegroGL1.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" | 6 | | 7 | g++.exe: allegroGL1.dev: linker input file unused because linking not done | 8 | | 9 | g++.exe allegroGL1.o -o "allgroGL1.exe" -L"C:/Dev-Cpp/lib" -lagl -lalleg -luser32 -lgdi32 -lopengl32 -lglu32. | 10 | | 11 | g++.exe: allegroGL1.o: No such file or directory | 12 | | 13 | make.exe: *** [allgroGL1.exe] Error 1 | 14 | | 15 | Execution terminated |
I used this as my linker: -lagl -lalleg -luser32 -lgdi32 -lopengl32 -lglu32
|