Initialisation with data from dll-libraries

Jørgen Steensgaard-Madsen jsm@steensgaard.org
Sun Apr 2 11:55:00 GMT 2006


Asking for help.
I am porting a tool to implement interpreters from Linux to
Windows/Cygwin, and have succeeded with a statically linked version.
Interpreters depend on several libraries and use a dispatch table
with pointers to functions from the libraries. The statically linked
port has been tested succesfully.
With gcc it is possible to build dll-versions of the libraries
(i.e. pairs of cygXXX.dll and libXXX.dll.a). An application can be
built, if there is no dispatch table, but when I try to build an
interpreter the resulting dispatch table contains just null
references.
The terminology related to dll is rather confusing to me as a novice
user of these. After having looked into various descriptions I am
left with a number of questions:
 . The following command (outline) has been used:
 $(CC) -o demo */glue.o dispatch.o \
 -Wl,--enable-auto-import \
			-Wl,--no-whole-archive $(LFLAGS)
 No error or warning arises, and the interpreter starts to ask
 for input as expected, but the first attempt to use the
 dispatch table leads to a segmentation fault.
 Am I missing some options here?
 . Will a *.def file be helpful (or: required) in order to have the
 linker initialise the dispatch table correctly?
 . Must I use dlltool rather than just gcc to build the libraries
 with enough information to get the dispatch table initialised?
Please help me if you can.
Jørgen
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /