Problem compiling DLL
Daniel Adolfsson
daniel.adolfsson@gmail.com
Wed Sep 5 09:52:00 GMT 2007
When I compile, for example, a HelloWorld class using a DLL version of
libgcj, I'm using:
gcj -o HelloWorld.exe --main=HelloWorld HelloWorld.java -findirect-dispatch
To compile a DLL I type:
gcj -shared -o Test.dll -Wl,--out-implib,libtest.a Test.java
Also, If I want to compile an HelloWorld that makes use of this class,
this doesn't work however. Nor does adding -findirect-dispatch work.
gcj -o HelloWorld.exe --main=HelloWorld --classpath=. -L. -ltest Test.java
Daniel
On 9/5/07, Andrew Haley <aph-gcc@littlepinkcloud.com> wrote:
> Daniel Adolfsson writes:
> > It was me who failed to link with the proper libraries, but it's working now.
> >
> > I have a different issue now though, and I'm not sure how to solve it,
> > if it can be solved.
> >
> > First, I can link against the DLL version of libgcj, but I need to use
> > -findirect-dispatch, otherwise it won't find the main class. Should I
> > really have to use this switch?
>> That seems odd. Please let us know how you're linking.
>> > Also, using a second DLL doesn't work as it won't find the classes.
>> That also seems odd. I think you may be linking incorrectly.
>> Andrew.
>
More information about the Java
mailing list