[sdljava-users] Problems
Status: Beta
Brought to you by:
ivan_ganza
From: Nuno S. <dev...@im...> - 2006-07-10 20:08:24
|
Hi, I did that. But the binaries i have are compiled for linux. I need them compiled for osx (i think) What i described was my problems in compiling sdljava for osx MACKIE:~/Desktop/sdljava-0.9.1/src/sdljava/native lpx$ make >gcc -o libsdljava.so SDLAudio_wrap.o SDLEvent_wrap.o SDLMain_wrap.o >SDLVideo_wrap.o SDLJoystick_wrap.o SDLCdrom_wrap.o -lSDL >/usr/bin/ld: Undefined symbols: >_main >collect2: ld returned 1 exit status >make: *** [libsdljava.so] Error 1 > >I also had to take an option -shared because the compiler didnt have it. > >I have libsdl installed and the sdl libraries are in the place i >think they should (it was the gentoo emerge to do it) > >--- /usr/lib/ >>> > >>> /usr/lib/libSDL-1.2.0.11.0.dylib >>> > >>> /usr/lib/libSDL-1.2.0.dylib -> libSDL-1.2.0.11.0.dylib >>> > >>> /usr/lib/libSDL.a >>> > >>> /usr/lib/libSDL.dylib -> libSDL-1.2.0.11.0.dylib >>> > >>> /usr/lib/libSDL.la >>> > >>> /usr/lib/libSDLmain.a >>> > >I tried to pass a manual path to linker but or i dont know how to do >it or it doesnt work > >MACKIE:~/Desktop/sdljava-0.9.1/src/sdljava/native lpx$ make >gcc -o libsdljava.so SDLAudio_wrap.o SDLEvent_wrap.o SDLMain_wrap.o >SDLVideo_wrap.o SDLJoystick_wrap.o SDLCdrom_wrap.o -l /usr/lib/SDL >/usr/bin/ld: can't locate file for: -l/usr/lib/SDL >collect2: ld returned 1 exit status >make: *** [libsdljava.so] Error 1 About the other problems. Yes, in part. I finally realized that maybe some of my problems where in handling SDL. I think that part of my problems are derived to Directfb, because it sometimes hangs when getting resources like keyboard and mouse. Is there any other way of putting SDL working without using directfb? Many thx Nuno Santos Greetings Nuno, SDLJava has not yet officially worked on OSX. However regardless I think it should work but I don't have an OSX machine to verify this myself. The error you are getting, java.lang.UnsatisfiedLinkError, is because the virtual machine cannot find the library. You need to pass the location of the SDLJava shared library as a -D switch. $ java -Djava.library.path=<SOME_PATH> Give that a shot and let me know if it works! BTW: Did you ever resolve your earlier problems?? |