From: khan AT xraylith DOT wisc DOT edu (Mumit Khan) Subject: Using dllwrap on C++ code [Re: Linker error] 9 Dec 1998 07:19:09 -0800 Message-ID: <199812090432.WAA05328.cygnus.gnu-win32@modi.xraylith.wisc.edu> References: <000001be22a6$0dab05a0$0200a8c0 AT panoramix DOT askesis DOT nl> To: "Joost Kraaijeveld" Cc: gnu-win32 AT cygnus DOT com "Joost Kraaijeveld" writes: > Below is the output of a compilation. Can anyone give me am idea where I > must look for the error? Note that I've changed the subject line to reflect the problem so that it's easier to find when doing a mailing list search. Dllwrap by default uses the C compiler-driver since it has no way of knowning otherwise. Since you're linking C++ code, - you can tell dllwrap that it needs to use the C++ driver via the --driver-name=c++ option so that the C++ runtime is automatically linked in (preferred method in my book). $ dllwrap --driver-name=c++ -o pq++.dll --dllname pq++.dll \ --def pq++.def pgenv.o pgconnection.o pgtransdb.o pgcursordb.o \ pglobject.o ../../utils/dllinit.o -L../libpq -lpq - or, include the C++ runtime library explicitly (-lstdc++). $ dllwrap -o pq++.dll --dllname pq++.dll \ --def pq++.def pgenv.o pgconnection.o pgtransdb.o pgcursordb.o \ pglobject.o ../../utils/dllinit.o -L../libpq -lpq -lstdc++ fyi, dllwrap deduces the ``--dllname ' argument from `-o ' argument (and vice versa), so you don't need to specify the --dllname any more. I should probably write some documentation, but the weather needs to turn really cold before that happens. Regards, Mumit - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".