Phasor
Phasor

Reputation: 31

What does the @ symbol mean in the error LNK2019?

I'm trying to resolve my linker error:

error LNK2019: unresolved external symbol _WDC_ReadAddr32@16 referenced in function

I'm not sure what the @16 refers to.

I'm pretty sure I added the correct lib file to the project. I did a dump of the lib file using dumpbin.exe, and saw:

So I'm confused at why the linker would be looking for _WDC_ReadAddr32@16, even though it manage to link the other symbols inside that lib file.

The function prototype is:

DWORD DLLCALLCONV WDC_ReadAddr32(WDC_DEVICE_HANDLE hDev, DWORD dwAddrSpace, KPTR dwOffset, UINT32 *val);

I'm using Visual Studio 2010 to compile. Also the lib file was compile in C so it had extern "C" around the methods, but I'm trying to use it in a C++ project.

Upvotes: 1

Views: 397

Answers (3)

drazir
drazir

Reputation: 1

Add KERNEL_64BIT to the C prepropressor defines. In this way, KPTR becomes 8 bytes instead of 4 and the linker will look for _WDC_ReadAddr32@20 in the library.

http://www.jungo.com/st/support/tech_docs/td43.html

Upvotes: 0

Mgetz
Mgetz

Reputation: 5128

The @ sign refers to the number of bytes of parameters for the function per Raymond Chen

Upvotes: 1

Related Questions