This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
building/linking SWT statically (including statical jni)
- From: Erik Poupaert <erik dot poupaert at chello dot be>
- To: JBoekemeier at inetsoftware dot de
- Cc: craigv at voxware dot com, java at gcc dot gnu dot org
- Date: Mon, 16 Jun 2003 23:08:46 +0000
- Subject: building/linking SWT statically (including statical jni)
You can build the statical archives for swt both on lin32 as on win32
almost without changes to the source code.
I'll send you the bash scripts for building these archives seperately,
if you want. Since they are quite big, I wouldn't want to send them to
the mailing list.
Be careful to apply compilation, linking options and shared library
dependencies mentioned in the buildmodels below to your final
executables, when linking with the static swt archives on your platform
(win32 or lin32).
In my impression, building and linking with other static jni archives
will normally follow the same principles.
These options were ripped from the SWT make files and
my executables build with no problems with these.
buildmodel aredir-org-eclipse-swt;
redirect
{
lin32 org-eclipse-swt-lin32-2-132;
win32 org-eclipse-swt-win32-2-132;
}
buildmodel org-eclipse-swt-lin32-2-132;
compilation options
{
-fjni
}
archive dependencies
{
native whole org-eclipse-swt-lin32-jni-2-132;
}
exclusive platforms
{
lin32;
}
buildmodel org-eclipse-swt-lin32-jni-2-132;
exclusive platforms
{
lin32;
}
compilation options
{
`pkg-config --cflags gtk+-2.0`
`pkg-config --cflags pango`
-DLINUX
-DGTK
-fpic
-fPIC
-export-dynamic
}
link options
{
-export-dynamic
}
shared library dependencies
{
gtk-x11-2.0;
gdk-x11-2.0;
atk-1.0;
gdk_pixbuf-2.0;
m;
pangoxft-1.0;
pangox-1.0;
pango-1.0;
gobject-2.0;
gmodule-2.0;
dl;
glib-2.0;
gthread-2.0;
pthread;
}
buildmodel org-eclipse-swt-win32-2-132;
compilation options
{
-fjni
}
archive dependencies
{
native whole org-eclipse-swt-win32-jni-2-132;
}
exclusive platforms
{
win32;
}
buildmodel org-eclipse-swt-win32-jni-2-132;
exclusive platforms
{
win32;
}
compilation options
{
-export-dynamic
-DSWT_VERSION=2
-DSWT_BUILD_NUM=132
-D_X86_=1
-D_WIN32
-D_WIN95
-D_WIN32_WINDOWS=0x0400
-D_MT
-DWIN32
-D_WIN32_DCOM
}
link options
{
-export-dynamic
}
shared library dependencies
{
ole32;
comctl32;
user32;
gdi32;
comdlg32;
kernel32;
shell32;
advapi32;
imm32;
winspool;
oleaut32;
}