From: anorland AT hem2 DOT passagen DOT se (Anders Norlander) Subject: Re: third party DLL lib references 7 Nov 1998 03:06:40 -0800 Message-ID: <3642B097.7EDFB42C.cygnus.gnu-win32@hem2.passagen.se> References: <19981105003416 DOT 7380 DOT qmail AT findmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Matthew Thompson Cc: gnu-win32 AT cygnus DOT com Matthew Thompson wrote: > > Hi, > > I'm sure everyone is sick of questions from people linking to third > party DLL's, so sorry in advance for possibly beating a dead horse (to > death even!). In case you're wondering, I have read all the FAQs, > downloaded all the tools, done the archive searches, etc. I still think > I may have a unique problem (or possibly I am being dumb in a unique way). > > I am linking to a 3rd party DAQ dll that is written for MSVC++. When I > use pexport to create a ref file, I get the proper reference names, > but they are preceded and followed by trash characters. Using the What do you mean by trash characters? > dlltool then gives me errors (not the one stemming from leaving the dll > name in the first row - I deleted it) and I can't create a library. > > My next step was to type in a ref file by hand using all the proper > procedure names. Dlltool then seems to work, creating a lib file > with no errors. However, when I link to that lib file, I get the > following error for every function call I make to the dll: > C:\WINDOWS\TEMP\cc0010161.o(.text+0x3f):test2.cc: undefined > reference to `rdd_detect_RTD_boards(short, rdd_board_type_t *, short *)' Aha, test2.cc is C++. MSVC uses different name mangling and calling mechanisms, so the trash characters are decorated C++ functions. MSVC++ code simply cannot be linked with G++ code, sorry. Anders Norlander - 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".