[Plib-users] plib 1.8.5 & Cygwin problem
Brought to you by:
sjbaker
From: Maxime C. <umx...@ho...> - 2010-10-01 17:24:02
|
I am actually trying to port to Win a little command line app I did in OSX. That app uses plib's js and ul libraries. It works flawlessly on OSX. I tried to compile it on my Win 7 OS using latest Cygwin. I compiled plib statically and no problem so far using this configure options : ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- cd plib-1.8.5 ./configure --prefix="/home/Maxime/Lutrin/Libraries" --disable-shared --disable-fnt --disable-pw --disable-net --disable-pui --disable-sg --disable-sg --disable-psl --disable-sl --disable-ssg --disable-puaux --disable-ssgaux make make install ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- But a problem occurs when I try to use those compiled libs it on my code (that compiled fine and worked fine on osx with static plib) : ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Maxime@Maxime-WINMAC ~/Lutrin/Accelero Stage 3$ make g++ -o main.o -c main.cpp -W -Wall -ansi -I./include In file included from main.cpp:25: accelero.h:39:3: warning: no newline at end of file In file included from main.cpp:26: main.h:23:5: warning: no newline at end of file main.cpp: In function `int main(int, char**)': main.cpp:72: warning: passing `double' for converting 1 of `void Sleep(DWORD)' main.cpp: At global scope: main.cpp:33: warning: unused parameter 'argc' main.cpp:33: warning: unused parameter 'argv' main.cpp:86:2: warning: no newline at end of file g++ -o accelero.o -c accelero.cpp -W -Wall -ansi -I./include In file included from accelero.cpp:25: accelero.h:39:3: warning: no newline at end of file accelero.cpp:65:2: warning: no newline at end of file g++ -o bin/accelero.exe main.o accelero.o -lwinmm ./lib/libplibul.a ./lib/libpli bjs.a ./lib/libplibjs.a(jsWindows.o): In function `_ZN10jsJoystick4openEv': /home/Maxime/Lutrin/Libraries/Sources/plib-1.8.5/src/js/jsWindows.cxx:106: undef ined reference to `_joyGetDevCapsA@12' /home/Maxime/Lutrin/Libraries/Sources/plib-1.8.5/src/js/jsWindows.cxx:120: undef ined reference to `ulSetError(ulSeverity, char const*, ...)' ./lib/libplibjs.a(jsWindows.o): In function `_ZN10jsJoystickC2Ei': /home/Maxime/Lutrin/Libraries/Sources/plib-1.8.5/src/js/jsWindows.cxx:166: undef ined reference to `_joyGetNumDevs@0' ./lib/libplibjs.a(jsWindows.o): In function `_ZN10jsJoystickC1Ei': /home/Maxime/Lutrin/Libraries/Sources/plib-1.8.5/src/js/jsWindows.cxx:166: undef ined reference to `_joyGetNumDevs@0' ./lib/libplibjs.a(jsWindows.o): In function `_ZN10jsJoystick7rawReadEPiPf': /home/Maxime/Lutrin/Libraries/Sources/plib-1.8.5/src/js/jsWindows.cxx:192: undef ined reference to `_joyGetPosEx@8' /home/Maxime/Lutrin/Libraries/Sources/plib-1.8.5/src/js/jsWindows.cxx:254: undef ined reference to `ulSetError(ulSeverity, char const*, ...)' collect2: ld returned 1 exit status make: *** [accelero.exe] Error 1 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- And here is my Makefile : ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- CXX=g++ CXXFLAGS=-W -Wall LDFLAGS= DEBUG= -O3 EXEC=accelero.exe EXECDIR=bin LIBRARIES = ./lib/libplibul.a ./lib/libplibjs.a INCLUDES = -I./include all:$(EXEC) $(EXEC): main.o accelero.o $(CXX) -o $(EXECDIR)/$@ $^ $(LDFLAGS) $(LIBRARIES) main.o: main.cpp accelero.h $(CXX) -o $@ -c $< $(CXXFLAGS) $(INCLUDES) accelero.o: accelero.cpp accelero.h $(CXX) -o $@ -c $< $(CXXFLAGS) $(INCLUDES) clean: rm -rf *.o ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- So is someone can help me to figure out what I could do wrong here ? Thanx in advance. .maxime |