[Plib-users] Linking or compaling problem.
Brought to you by:
sjbaker
From: Francisco C. <fra...@gm...> - 2005-08-08 06:03:24
|
Hi everybody. I'm new to the list and I wrote here because I need help. I read the list archives but I couldn' t find the solution, only a few tips but they thosen' t are enough for me... The problem is this, I dowload the package of plib and I compiled it with cygwin and Dev-cpp (mingw). The compilation runs fine I think, I get the lib*.a files. Then I think the problem is with the linker... I get a simple piece of code that uses SDL and openGL and compile and run fine, then I modified this code with two or three lines to get plib in my program, but the the program don't finish the compiling anymore. It's seems that they don't recognize the openGL functions gl*(*). I think maybe is the order of the parameters passed to the linker (I read a problem like that in the archives) but my experience with this enviroment is still too little... Here are the makefile the Dev-cpp automatically generate for the project: # Project: SDL-GL_01 # Makefile created by Dev-C++ 4.9.9.0 CPP =3D g++.exe -D__DEBUG__ CC =3D gcc.exe -D__DEBUG__ WINDRES =3D windres.exe RES =3D SDL-DL_01_private.res OBJ =3D main.o $(RES) LINKOBJ =3D main.o $(RES) LIBS =3D -L"C:/Archivos de programa/Dev-Cpp/lib" -mwindows -lmingw32 -lopengl32 -lSDLmain -lSDL ../../lib/plib/libplibfnt.a ../../lib/plib/libplibpu.a ../../lib/plib/libplibul.a -mwin32 -lm -lgdi32 -lwinmm -lgmon -pg -g3 INCS =3D -I"C:/Archivos de programa/Dev-Cpp/include"=20 CXXINCS =3D -I"C:/Archivos de programa/Dev-Cpp/include/c++/3.3.1"=20 -I"C:/Archivos de programa/Dev-Cpp/include/c++/3.3.1/mingw32"=20 -I"C:/Archivos de programa/Dev-Cpp/include/c++/3.3.1/backward"=20 -I"C:/Archivos de programa/Dev-Cpp/lib/gcc-lib/mingw32/3.3.1/include"=20 -I"C:/Archivos de programa/Dev-Cpp/include" BIN =3D SDL-GL_01.exe CXXFLAGS =3D $(CXXINCS) -DPU_USING_SDL -DWIN32 -g -mwin32 -lm -lgdi32 -lwinmm -pg -g3 CFLAGS =3D $(INCS) -pg -g3 .PHONY: all all-before all-after clean clean-custom all: all-before SDL-GL_01.exe all-after clean: clean-custom =09rm -f $(OBJ) $(BIN) $(BIN): $(OBJ) =09$(CPP) $(LINKOBJ) -o "SDL-GL_01.exe" $(LIBS) main.o: main.cpp =09$(CPP) -c main.cpp -o main.o $(CXXFLAGS) SDL-DL_01_private.res: SDL-DL_01_private.rc=20 =09$(WINDRES) -i SDL-DL_01_private.rc -I rc -o SDL-DL_01_private.res -O cof= f=20 And the errors that the linker shots me are like this: ../../lib/plib/libplibpu.a(pu.o): In function `Z16glIsValidContextv': C:/Archivos de programa/Dev-Cpp/include/plib-1.8.4/src/pui/pu.cxx:105: undefined reference to `wglGetCurrentContext@0' ../../lib/plib/libplibpu.a(pu.o): In function `Z12puDrawCursorii': C:/Archivos de programa/Dev-Cpp/include/plib-1.8.4/src/pui/pu.cxx:137: undefined reference to `glColor4fv@4' C:/Archivos de programa/Dev-Cpp/include/plib-1.8.4/src/pui/pu.cxx:139: undefined reference to `glBegin@4' C:/Archivos de programa/Dev-Cpp/include/plib-1.8.4/src/pui/pu.cxx:140: undefined reference to `glVertex2i@8' etc, etc... In the code I already do this: #define _WIN32_WINNT 0x0500 =20 #define WINVER 0x0500 #define WIN32_LEAN_AND_MEAN #define NOGDI #include <windows.h> #include <gl/gl.h> #include <SDL/SDL.h> #define PU_USE_SDL 1 #include <plib/pu.h> In this order... Well, this is a picture of the problem. Like I'd say I have little experience yet, so I couldn't find a solution to this problem. If someone can help me I really appreciate the effort... Thanks a lot... PD: Excuse my english, it's not my natural language :) |