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??
-Ivan/
Nuno Santos wrote:
>Hi,
>
>I'm trying to install sdljava in OSX, so i'm trying to compile from
>the scratch.
>
>When doing that i have the following error:
>
>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
>
>The first thing i tried was to run directly and of course i had the
>following result, but i dont know what the message really means, can
>you tell me what it really says?
>
>MACKIE:~/Desktop/IAE/Reactiva lpx$ ./corre
>Native code library failed to load.
>java.lang.UnsatisfiedLinkError: no sdljava in java.library.path
>MACKIE:~/Desktop/IAE/Reactiva lpx$
>
>
>Best regards,
>
>Nuno Santos
>
>
>
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>sdljava-users mailing list
>sdl...@li...
>https://lists.sourceforge.net/lists/listinfo/sdljava-users
>
>
|