Lars Uffmann <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I am trying to use an Ansi-C-compatible API provided by a closed-source > software, and I am badly failing to link against the library, which I am > willing to blame on my inexperience with linker settings. > > What I have is: > - the header files for the API > - the *.dll files in my system32 folder > - the *.lib file for the one dll that contains the function I want to use. > > My understanding is that I need to > - include the header files in my source (as if it was my own code and I > had the cpp-files also) > - use the function as intended in my code and as defined in the header > - link against the libfile > - have the dll available at runtime > > So how do I link against the libraryname.lib file - which command line > option for the g++ linker is that? > > Grateful for any help!
Poking into the dark: Do the C headers have something like 'extern "C"' mentioned somewhere? If not, try extern "C" { #include "the_software_C_header.h" } A C++ compiler typically "mangles" the function names it enconters, so the linker might not be able to match them with the symbols from the library. Andre' _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus