unresolved external symbol/using an external dll

From: Scott Allen (scottelloco_at_yahoo.com)
Date: 04/30/04


Date: 30 Apr 2004 12:06:57 -0700

Hello,

I'm new to C++ development and I'm trying out figure out the cause of
an 'unresolved external symbol' error that I'm receiving when
compiling. Here is some history on what I'm doing:

I have an existing VC++ project that mostly just reads a SQL Server
database does some work on the data and insert the results into
another table. I have the need to incorproate some functionality from
a certain dll named cedb300.dll. cedb300.dll is an unsupported
Microsoft dll that allows the reading and writing of Windows CE
databases to a disk (as opposed to an actual device). I have a list of
function signatures that are externally available from this dll.

I only have access to the dll, so I used a program called 'DLL to Lib'
(http://www.binary-soft.com/dll2lib/dll2lib.htm) to generate a .lib
file from the dll. This appeared to be successful. I copied both the
cedb300.dll and cedb300.lib files into my VC++ project directory and
added cedb300.lib to 'Projects->Settings->Link->Object/library
modules'

I add a call in my VC++ project to one of the functions in
cedb300.dll, but when I try to compile I get a 'unresolved external
symbol' error message. Naturally, removing the call to the function
causes the error to go away and my app compiles.

So, being new to VC++, I'm not sure if there's some more code I need
to add to my source to allow me to call functions from an external
dll, or if VC++ is simply not able to access the .lib files or if the
lib file is corrupted, or all of the above.

Is there something else I need to add to my code/project to allow me
to call functions from an external dll? Or is there another tool
someone can recommend to create a lib from a dll?

Thanks very much,
-Scott



Relevant Pages

  • unresolved external symbol/using an external dll
    ... compiling. ... Microsoft dll that allows the reading and writing of Windows CE ... I only have access to the dll, so I used a program called 'DLL to Lib' ... or if VC++ is simply not able to access the .lib files or if the ...
    (microsoft.public.windowsce.app.development)
  • unresolved external symbol/using an external dll
    ... compiling. ... Microsoft dll that allows the reading and writing of Windows CE ... I only have access to the dll, so I used a program called 'DLL to Lib' ... or if VC++ is simply not able to access the .lib files or if the ...
    (microsoft.public.vc.language)
  • Re: Runtime error when using Matlab compiled dll
    ... Anyone had experience with compiling M-file into .lib and .dll and ... Now, I had the .h, .lib and .dll of that function. ...
    (comp.soft-sys.matlab)
  • Re: __imp_ Linking question
    ... When compiling the DLL, this header would be wrong, it needs to be ... A DUMPBIN /exports /symbols on the library shows this line ... I guess the .lib with the stubs created along with the ... DLL (hmmm, can you dumpbin a DLL at all? ...
    (microsoft.public.vc.language)
  • Re: How statically link lcc compiled DLL with Microsoft Visual C++?
    ... DLL with lcc but with another tools. ... One should convert lcc .lib files to ...
    (comp.compilers.lcc)