[
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
|
Yes that's exactly what i wantt to do.
I got a little further by doing the following :
gcj -fjni Hello.java -o Hello --main=Hello --classpath=/usr/local/share/java/libgcj-3.4.2.jar:. -lc -Djava.library.path=/
Users/cyberdeth/Development/swt-classes -undefined dynamic_lookup
after setting the following env variable : MACOSX_DEPLOYMENT_TARGET=10.3
but as soon as I run it i get :
dyld: ./Hello Undefined symbols:./Hello undefined reference to __ZN3org7eclipse3swt6layout9RowLayout6class$E expected
to be defined in a dynamic image
./Hello undefined reference to __ZN3org7eclipse3swt7widgets5Label6class$E expected to be defined in a dynamic image
./Hello undefined reference to __ZN3org7eclipse3swt7widgets5Shell6class$E expected to be defined in a dynamic image
./Hello undefined reference to __ZN3org7eclipse3swt7widgets7Display6class$E expected to be defined in a dynamic image
Trace/BPT trap
which is further than I was before.
I have created the following structure :
Hello.app
+- Contents
+- Frameworks
+- SWT.framework
+- libswt-carbon-3063.jnilib
+- libswt-webkit-carbon-3063.jnilib
+- libswt-pi-carbon-3063.jnilib
+- MacOS
+- Hello
+- java_swt
+- Resources
But when I click on the Application it just exits.
Do you know why ?
Thanks
On Wed Feb 9 13:15 , Joe Larson <joe.larson@xxxxxxxxxxxxxxx> sent:
>Are you going to produce a .app directory structure? If so, then you
>will simply add the lib*.jnilib files to what you distribute and
>include them in the java.load.library path.
>
>Email me directly if that's the direction you're going and if you want
>more guidance.
>
>-Joe
>
>On Feb 9, 2005, at 12:35 PM, cyberdeth@xxxxxxxxxx> wrote:
>
>> Hmmm. I'm going to quickly try something. will need to recompiole gcc
>> though. so will be take a while.
>>
>> So am i correct in assuming, that if you are right, that I should be
>> able to compile a SWT application without linking against
>> any library, and just by using the classpath, except if I want to link
>> in libgcj statically, you know so i don't have to ship libgcj
>> with...
>>
>> Correct ?
>>
>> On Wed Feb 9 11:19 , Billy Biggs vektor@xxxxxxxxxxxx> sent:
>>
>>> I should have more closely read your mail.
>>>
>>>> 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.
>>>
>>> If this works fine, then what's the problem?
>>>
>>>> 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.
>>>
>>> SWT will dynamically load libswt-carbon-xxx.jnilib itself. You just
>>> need
>>> to ship the jnilib with your SWT application. It is not indented to
>>> be
>>> linked statically into the executable.
>>>
>>> -Billy
>>>
>>> _______________________________________________
>>> platform-swt-dev mailing list
>>> platform-swt-dev@xxxxxxxxxxx
>>> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>>
>> _______________________________________________
>> platform-swt-dev mailing list
>> platform-swt-dev@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
>_______________________________________________
>platform-swt-dev mailing list
>platform-swt-dev@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/platform-swt-dev