ReadyTalk / avian

[INACTIVE] Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.
https://readytalk.github.io/avian/
Other
1.22k stars 172 forks source link

UnsetisfiedLinkError #554

Closed theScrabi closed 6 years ago

theScrabi commented 6 years ago

Hello I git the error:

java/lang/UnsatisfiedLinkError: java/lang/System.getNativeProperties()[Ljava/lang/String;
  at java/lang/System.getNativeProperties (native)
  at java/lang/System.makeProperties (line 75)
  at java/lang/System.access$000 (line 24)
  at java/lang/System$Static.<clinit> (line 30)
  at java/lang/System.getProperty (line 53)
  at java/io/PrintStream$Static.<clinit> (line 19)
  at java/io/PrintStream.println (line 105)
  at Test.main (line 5)

When I try to call System.out.println("hallo welt")

theScrabi commented 6 years ago

All right so the problem was that i linked against libavian.a. Howerver you should not do that since g++ somehow cuts away some symbols that should have been taken form the shared lib. You MUST link against the *.o files that are contained in that lib.

dicej commented 6 years ago

Sorry for the late response. You should be able to link against libavian.a by either using the -Wl,--whole-archive option at the link step or else unpacking the .o files from the library using ar x. See https://github.com/readytalk/avian#embedding for an example.

theScrabi commented 6 years ago

All right thank you :)