Languages‎ > ‎C++‎ > ‎

How to determine default libraries for an .obj object file in Visual C++

For unresolved external symbol errors from the linker :

basically what is happening is you have to use the exact symbol that is located in your lib file, it could be a spelled wrong, also it is case sensitive.

for example:

example.lib ---> contains
scope()    ---> symbol in lib file
create()   ---> symbol in lib file
pick()       ---> symbol in lib file

whenyou use the symbol contained in the lib file.

example code:
int main()
   if (c > 100)
   create()          // referenced symbol same as what is in your lib file
                        // symbol referenced is case-sensitive
} // end main

But you can also determine the contents of the libs by using dumpbin.exe. On the command line, set the path by running either \Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat  or  \Program Files\Microsoft Visual Studio 8\vc\vcvarsall.bat

And then invoke dumpbin.exe:  dumpbin.exe /exports CLU32.lib

If these import libraries contain your symbols, you're set to go.  Remember that the corresponding DLL's must be on the path or the same directory as the executable when you run it.

Note that dumpbin.exe can also be used on the DLL's themselves:  dumpbin.exe /exports CLU32.dll