This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: -dlopen self


I've tried two alternatives:

First alternative:

$ ar -crs lib-swtjni.a swt.o callback.o structs.o

$ gcj -export-dynamic -Xlinker --start-group myprog1.a myprog2.a
lib-swtjni.a -Xlinker --end-group \
	-o
myprog --main=mymain -L/usr/lib -L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0
\
	-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgo
bject-2.0 \
	-lgmodule-2.0 -ldl -lglib-2.0

The linking doesn't yield error messages, but it ltdl fails to find the
symbols

Second alternative:

$ gcj -export-dynamic swt.o callback.o structs.o -Xlinker --start-group
myprog1.a myprog2.a -Xlinker --end-group \
	-o
myprog --main=mymain -L/usr/lib -L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0
\
	-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgo
bject-2.0 \
	-lgmodule-2.0 -ldl -lglib-2.0

The linking fails, saying "swt.o ... undefined reference to
'g_thread_init'". The symbol is defined, however, in -lglib-2.0.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]