Reputation: 102406
We are catching a linker error:
2>cryptlib.lib(x64dll.obj) : error LNK2001: unresolved external symbol "unsigned __int64 * CryptoPP::rdtable::Te" (?Te@rdtable@CryptoPP@@3PA_KA)
2>x64\Output\Debug\cryptest.exe : fatal error LNK1120: 1 unresolved externals
The missing symbol is located in rijndael.cpp
, and its its used in x64dll.asm
like so:
include ksamd64.inc
EXTERNDEF ?Te@rdtable@CryptoPP@@3PA_KA:FAR
EXTERNDEF ?g_cacheLineSize@CryptoPP@@3IA:FAR
EXTERNDEF ?SHA256_K@CryptoPP@@3QBIB:FAR
...
The source files are compiled with /GL
, so we can't use dumpbin /symbols
on rijndael.obj
to inspect the object files to see what's going on with this configuration. Also see Dumpbin's /SYMBOL documentation and Why is DumpBin telling me there are no COMDATs in my binaries...?.
Microsoft's documentation tells us what we can't use, but it fails to tell us what we should use in this situation.
How do we locate and display symbols in object files when compiling with /GL
?
Upvotes: 1
Views: 197
Reputation: 7202
If you run LINK /LIB /LTCG /OUT:output.lib rijndael.obj
it should produce a static library with actual compiled code. You can then run dumpbin /ALL output.lib
to see the symbols. dumpbin /SYMBOLS output.lib
does not work for me.
You may need to adjust the LINK
line to include additional flags that are usually passed when you link. E.g., /LIBPATH
entries and the like.
Upvotes: 0