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]

Re: using linker flags


abhishek desai wrote:

> I am trying to compile a simple HelloWorld.java program using gcj. I
> am linking the libgcj library statically to the program using the
> command
> 
> build_mipsel/staging_dir/bin/mipsel-linux-gcj -static HelloWorld.java
> --main=HelloWorld -o HelloWorld -Lbuild_mipsel/staging_dir/lib
> 
> This compiles the HelloWorld correctly and I am bale to run it on a
> mipsel hardware.
> 
> When I try using linker flags using the command
> 
> build_mipsel/staging_dir/bin/mipsel-linux-gcj -static HelloWorld.o
> --main=HelloWorld -o HelloWorld -Lbuild_mipsel/staging_dir/lib
> -Xlinker -M
> 
> I get the error
>            mipsel-linux-gcj: cannot specify `main' class when not linking
> 
> 
> Can someone please tell me how I can specify the linker flags to this.

-Wl,<linker option>,<linker option>,...

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]