This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
order of arguments on command line when linking
- From: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: <java at gcc dot gnu dot org>
- Date: Thu, 13 Feb 2003 05:11:59 +0100
- Subject: order of arguments on command line when linking
When I change the order of arguments on the command line when linking, I may
get linking errors, which can be solved by changing the order of the
arguments. For example, I know the following won't work:
gcj -s -fCLASSPATH=cls libexample.a libswtwin32.a libswtjniwin32.a
swt-win32.exp ...
I have to put the swt-win32.exp argument first:
gcj -s -fCLASSPATH=cls swt-win32.exp libexample.a libswtwin32.a
libswtjniwin32.a ...
Sometimes it simpler than that:
gcj lib1.a lib2.a ... won't work. It must be: gcj lib2.a lib1.a ...
Is there a reason for this?