* compiling to native: simple q
@ 2002-04-10 20:17 Nic Ferrier
2002-04-11 7:44 ` Bryce McKinlay
0 siblings, 1 reply; 2+ messages in thread
From: Nic Ferrier @ 2002-04-10 20:17 UTC (permalink / raw)
To: java
Here's a simple question that is probably just the result of me
debuging dodgy apache code all night...
The paperclips source code now compiles with GCJ (yea!) but I'm now
trying to get the class files to compile to something native.
I'm doing this:
gcj --main=gnupaperclips -o gnupc classfiles ...
where classfiles is the result of:
find classes -name "*.class" -print
I'm getting a whole bunch of errors that are to do with the
dependancies of the class files.
I have the CLASSPATH variable set to the jar files that are the
dependancies for the paperclips classes, do I need to include them as
compilation targets? (when I do that gcj segfaults).
Should I be unpacking the jar files as classes and having gcj compile
the whole thing?
Should I be converting all the jar files into native libs and solving
the depends that way?
In short, I'm a bit unsure of what I should be doing with dependant
jar files.
Could someone please explain?
Nic
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: compiling to native: simple q
2002-04-10 20:17 compiling to native: simple q Nic Ferrier
@ 2002-04-11 7:44 ` Bryce McKinlay
0 siblings, 0 replies; 2+ messages in thread
From: Bryce McKinlay @ 2002-04-11 7:44 UTC (permalink / raw)
To: Nic Ferrier; +Cc: java
Nic Ferrier wrote:
>I'm getting a whole bunch of errors that are to do with the
>dependancies of the class files.
>
>I have the CLASSPATH variable set to the jar files that are the
>dependancies for the paperclips classes, do I need to include them as
>compilation targets? (when I do that gcj segfaults).
>
>Should I be unpacking the jar files as classes and having gcj compile
>the whole thing?
>
>Should I be converting all the jar files into native libs and solving
>the depends that way?
>
Yes. You can't have native code that depends on bytecode (except for
weak dependencies, ie reflection)
You could compile the .jar files into shared libraries:
gcj -shared foo.jar -o libfoo.so
And then link your application against them:
gcj my/classes/*.java --main=my.classes.main -o myapp libfoo.so
regards
Bryce.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-11 3:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-10 20:17 compiling to native: simple q Nic Ferrier
2002-04-11 7:44 ` Bryce McKinlay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).