This is the mail archive of the cygwin@sources.redhat.com 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]

Re: building DLLs (was:RE: New user help - dont understand Mount (and the rest))


Charles Wilson writes:
 > building DLL's from C++ is not as well-studied as C.  Take a look at the
 > makefile in the <TOP>/ncurses/c++/ directory from the
 > ncurses-5.2-4-src.tar.gz tarball on any cygwin mirror for a clue.  Or,
 > for a smaller download, look at 
 > 
 > http://www.neuro.gatech.edu/users/cwilson/cygutils/dllhelpers-0.2.6.tar.gz
 > 
 > which is based on Mumit's original 0.2.5 version.
 > 
 > Unfortunately, I've got a deadline or I'd address this question a little
 > more thoroughly.  I'll try to get back to it this weekend.

This is what I finally got with the info in the dllhelpers package. I
did those steps to build the dll:

$ dlltool --export-all --output-def libosp_.def ../*.o

$ dlltool --dllname libosp.dll --def libosp_.def --output-lib libosp.a

$ dllwrap --driver-name g++ --def libosp_.def -o libosp.dll ../*.o --dllname li
bosp.dll

strip libosp.dll
cp libosp.dll /usr/local/bin

And then I built one of the SP apps:
$ c++ -g -O2 -o onsgmls nsgmls.o SgmlsEventHandler.o RastEventHandler.o StringS
et.o nsgmls_inst.o ../lib/.libs/libosp.a

This gets me pretty close to what I need. onsgmls runs properly and
creates all output that I expect. But instead of exiting gracefully I
get a popup reading:

  The instruction at "0xWhatever" referenced memory at
  "0xSomething". The memory could not be "read".

  Click on OK to terminate the application.

I'd appreciate any hints as to what this means for the lib creation or
the app creation steps.

regards,
Markus

-- 
Markus Hoenicka, PhD
UT Houston Medical School
Dept. of Integrative Biology and Pharmacology
6431 Fannin MSB4.114
Houston, TX 77030
(713) 500-6313, -7477
(713) 500-7444 (fax)
Markus.Hoenicka@uth.tmc.edu
http://ourworld.compuserve.com/homepages/hoenicka_markus/


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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