delorie.com/archives/browse.cgi | search |
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 DOT Hoenicka AT uth DOT tmc DOT edu http://ourworld.compuserve.com/homepages/hoenicka_markus/ -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |