This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
I have a successful bootstrap build of 3.4.3 on os 10.2.8. When trying to build shared objects, I am receiving link errors:
bash-2.05a$ cat ./Test.java public class Test {
public static void main (String [] argsv) { System.out.println ("Hello World"); }
}
bash-2.05a$ gcj -o helloworld --main=Test Test.java
bash-2.05a$ ./helloworld
Hello World
bash-2.05a$ gcj -shared -o helloworld.so Test.java
/usr/bin/ld: Undefined symbols:
_main
___eprintf
collect2: ld returned 1 exit status
bash-2.05a$ The link error on "main" makes me suspicous - I presumed using -shared meant that no main was required?
I am fully aware I may be missing something obvious, and welcome any (helpful :) critism on how to get this working.... is it possible that weirdness is happening as OSX's /usr/bin/ld is used?
I have seen many messages on problems building native SWT/SwingWT on OSX, which I am attempting - the Makefile in SwingWT for SWT uses the same flags I have (although also tries to link in various jnilibs, in error I think). This is what has led me to the problem of getting -shareds working on osx.... any ideas?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |