[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: [platform-swt-dev] Compiling of GCJ and SWT under MacOS X
 | 
I don't know the exact answer to your question, but here are a few  
pointers:
1. The Apple distributed gcc is modified from the standard version, so  
the standard gnu version may not work correctly with frameworks, etc.
2. jnilib's and dylib's are very different things. See the following  
URL's for more information:
http://developer.apple.com/documentation/Java/Conceptual/ 
Java14Development/Core_APIs/chapter_6_section_4.html
http://developer.apple.com/documentation/DeveloperTools/Conceptual/ 
MachORuntime/Overview/chapter_2_section_4.html
3. MacOSX has a library management tool called 'libtool'. You probably  
want to take a look at the man page.
Searching for 'java', 'jnilib' and 'dylib' on  
http://developer.apple.com might provide you with more information.
Regards,
Greg
On Feb 9, 2005, at 1:02 AM, <cyberdeth@xxxxxxxxxx> wrote:
Hi.
I have downloaded gnu gcc 3.4.3 and compiled it with the following  
command line
parameters :
configure --prefix=/usr --enable-languages=c,c++,java,f77,objc
--enable-threads=posix --enable-shared
make bootstrap
make install
Now this compiles everything fine under MacOS X.3 using the gcc  
compiler that
comes with the Developer Tools ie. gcc 3.3
When I compile a Hello World program using gcj, like so :
gcj Test.java -o Test --classpath  
/usr/share/java/libgcjxxx.jar:$CLASSPATH
--main=Test -lgcj
Then it compiles fine and the output from the program is as expected.
But. When I try to link against the libswt-carbon-xxxx.jnilib all hell  
breaks loose. I
have tried to make a symlink from *.jnilib to *.dylib and even to .a.  
When I do a file
on the jnilib it says it's a bundle.
I have tried to copy the jnilib files
into /System/Library/Frameworks/JavaVM.framework/Libraries and linking  
the
program as follows.
gcj Test.java -o Test --classpath  
/usr/share/java/libgcjxxx.jar:$CLASSPATH
--main=Test -lgcj -framework JavaVM
which fails.
When I do an ld style
ld Test.o -o Test -lgcj -framework JavaVM then it gives me an error  
that no __main is
found hence the --main=Test option.
when doing a gcj Test.o -o Test -lgcj libswt-carbon-xxxx.jnilib it  
fails as well telling
me that i can't call a static link editor using a dynamic link editor  
or something like
this. And this is where I'm struggling with.
I mean if I link against any other jnilib in the JavaVM framework it  
compiles
correctly. Maybe the jnilibs shouldn't be bundles ???
My long winded questions is :
1) Is my gcc configuration flags correct ?
2) How do you compile a program natively using the  
swt-carbon-xxxx.jnilib's ? If
you have a MacOS specific example could you please supply me with it.
I have been struggling with it for over a week now and I'm lost....
PLEASE....... Help me.
Francois Hensley
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev