Building Swt 64 bit [message #534468] |
Wed, 19 May 2010 09:54 |
OneGoodTurn Messages: 3 Registered: May 2010 |
Junior Member |
|
|
Hi everyone,
<< Originally I posted this in 'Newcomers' but was advised to repost here >>
I've spent a few days now trying to figure out how to build 64 bit SWT for use in an Eclipse Java project I'm working on. There are various resources in the FAQs that seem to be almost what I need, but not quite up to date:
I extracted the sources from CVS as per these instructions...
http://www.eclipse.org/swt/cvs.php
I found build instructions here
http://www.eclipse.org/swt/faq.php#gtk64
and here
http:// www.nbinteractive.com/Free_Resources/internet_tech_blog?arti cle_id=302
But they are both not quite up to date, so I'm trying to guess my way through the recent build scripts without - I think -much success. Here's what I'm doing...
1. Rename .classpath_gtk in org.eclipse.swt to .classpath
2. In org.eclipse.swt.gtk.linux.x86_64, run build.html as Ant Build with target 'build.jars', which gives this output -
Buildfile: /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/build.x ml
properties:
init:
build.jars:
properties:
init:
@dot:
[mkdir] Created dir: /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/temp.fo lder/@dot.bin
copy.gtk.src:
[copy] Copying 684 files to /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/temp.fo lder/@dot.src
copy.translationfiles:
is64:
[echo] Is64=true
replace64:
[echo] Converting java files to 64 bit
[javac] Compiling 582 source files to /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/temp.fo lder/@dot.bin
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[copy] Copying 3 files to /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/temp.fo lder/@dot.bin
[mkdir] Created dir: /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/@dot
[copy] Copying 814 files to /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/@dot
[jar] Building jar: /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/swt.jar
BUILD SUCCESSFUL
Total time: 6 seconds
So no replace.32.to.64 build target exists, but this seems to have built the 64 bit version of SWT as intended.
3. Refresh org.eclipse.swt
4. FAQs say run the Ant build script again, with 'buildNatives' as the target. Again, this doesn't exist, so I've gone for 'buildSources'.
Buildfile: /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/build.x ml
properties:
init:
build.sources:
properties:
init:
src.zip:
copy.gtk.src:
[delete] Deleting directory /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/temp.fo lder/@dot.src
[copy] Copying 684 files to /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/temp.fo lder/@dot.src
copy.translationfiles:
is64:
[echo] Is64=true
replace64:
[echo] Converting java files to 64 bit
[zip] Building zip: /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/src.zip
[delete] Deleting directory /home/mja/workspace/org.eclipse.swt.gtk.linux.x86_64/temp.fo lder/@dot.src
BUILD SUCCESSFUL
Total time: 2 seconds
All still looking good.
5. Refresh the gtk_linux_x86_64 project to pick up new sources.
6. And we are allegedly complete. However, when I attempt to build and run my 'HelloJava' application, I still have the error
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:19 7)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:17 4)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java: 63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java: 54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at HelloWorld.main(HelloWorld.java:12)
I'm clearly missing something, but I can't see what. I'm an experienced Linux dev, but on RT Linux for embedded platforms. I don't normally get involved in Gui work (on Linux).
My Eclipse is
Version: 3.5.2
Build id: M20100211-1343
The x86_64 is 3.647
I'm running Ubuntu Lucid Lynx.
I can't quite see what's going wrong here; either I'm not building the correct targets, or I'm building them but my linkage in the 'HelloJava' for 64 bit SWT is not quite correct,
Any help would be greatly appreciated everyone
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03932 seconds