Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199912121856.MAA30980@mercury.xraylith.wisc.edu> To: Alex Bertram cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: problems building a C++ dll In-Reply-To: Your message of "12 Dec 1999 13:50:22 EST." <19991212185022 DOT 8817 DOT qmail AT nwcst267 DOT netaddress DOT usa DOT net> Date: Sun, 12 Dec 1999 12:56:53 -0600 From: Mumit Khan Alex Bertram 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 string_char_traits, __default_alloc_template<0, 0> > const &, > vector, > __default_alloc_template<0, 0> >, allocator string_char_traits, __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 AT sourceware DOT cygnus DOT com