On 8/18/2010 3:58 PM, [email protected] wrote:
> Greetings. I have a VC++ 2010 Express solution with two projects written in 
> C. The first compiles a .dll and the second compiles a .dll, but also links 
> with the first's corresponding .lib. Every export in the first has 
> '__declspec(dllexport)' in the function declaration and definition. My second 
> library links fine against every function in the first except for all 
> exported symbols in one particular file. Using dumpbin.exe I can see all 
> expected function symbols in the .dll and yet the linker always fails. Any 
> idea why one file may have this problem while the others do not? I commented 
> out all calls to the unresolved symbols except one and here's the output:
>
> error LNK2019: unresolved external symbol "void __cdecl BGDB_Delete(struct 
> _BDADDR_t *)" (?BGDB_Delete@@YAXPAU_BDADDR_t@@@Z) referenced in function ...
>
> Any help is appreciated. Thanks. Jerry.

Mixing C++ and C could have that effect.  The compiler might have stored 
the wrong symbol in the object file and then the linker is having 
difficulties finding a match as a result.  See name mangling.

-- 
Thomas Hruska
CubicleSoft President

Barebones CMS is a high-performance, open source content management 
system for web developers operating in a team environment.

An open source CubicleSoft initiative.
Your choice of a MIT or LGPL license.

http://barebonescms.com/

Reply via email to