This is the mail archive of the cygwin mailing list for the Cygwin 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]

Initialisation with data from dll-libraries


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/


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