Subject: Re: third party DLL lib references
From: [email-masked] (Larry Hall)

7 Nov 1998 05:51:11 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: "Matthew Thompson" <[email-masked]>, [email-masked]

At 12:31 AM 11/5/98 -0000, 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 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 *)'
>
>Any help would be appreciated. 
>
>TIA and regards,
>Matt Thompson
>

Would you be trying to link to C++ libraries by any chance?  That might 
explain the "trash characters" you refer to.  These characters would be
the result of C++ name mangling, which is a different convention for
every compiler.  If you are using C++ libs from MSVC and the functions
you want have not been declared and built with "extern "C"", you won't
have much luck linking to them with anything but MSVC...

Larry Hall                              [email-masked]
RFK Partners, Inc.                      (781) 239-1053
8 Grove Street                          (781) 239-1655 - FAX
Wellesley, MA  02482-7797               http://www.rfk.com
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".