problems building a C++ dll
Mumit Khan
khan@nanotech.wisc.edu
Fri Dec 31 13:28:00 GMT 1999
Alex Bertram <alexkb@usa.net> writes:
>
> I'm trying to build a dll to be called by VB6.0. I have compiled, working
> command line program that was created by:
>
> g++ -c aviscos.cc -g -I /usr/local/include -DX_DISPLAY_MISSING
> ...
> g++ -o aviscos main.o hpenv.o hpoly.o cmdline.o rect.o aviscos.o -g -I
> /usr/local/include -DX_DISPLAY_MISSING -L/usr/local/lib -lplot
>
> when i try to compile it as a dll all hell breaks loose. I've been wresting
> with this for a few days and i've been able to get a straight-C dll working
> and callable with the same commands, but no success here.
>
> i've got cygwin b-20.1 with mummit's gcc 2.95.2 the makefile is from his own
> excel-dll example.
>
> i've included the output below.
>
> dllwrap --export-all --output-def aviscos.def --target=i386-mingw32 -mno-ygwi
> n
> --driver-name gcc -o aviscos.dll \
> aviscos.o cmdline.o hpenv.o hpoly.o rect.o -I/mingw32/lib -s -lplot
> -lstdc++ -liberty
> Warning: no export definition file provided
> dllwrap will create one, but may not be what you want
> aviscos.o: In function `plot_cmd(HPEnv &, basic_string<char,
> string_char_traits<char>, __default_alloc_template<0, 0> > const &,
> vector<basic_string<char, string_char_traits<char>,
> __default_alloc_template<0, 0> >, allocator<basic_string<char,
> string_char_traits<char>, __default_alloc_template<0, 0> > > > const &)':
> /Development/Alex/aviscos/aviscos.cc:203: undefined reference to
> `_impure_ptr'
You're mixing up Cygwin and Mingw, which will never work. If you're
indeed trying to build Mingw DLL to be excel callable, see my
mno-cygwin howto for some insights.
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/#mno-cygwin
You're first compiling the application as a Cygwin one, and trying to
build a Mingw DLL out of it!
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list