开发者

LNK2019 / 2001: unresolved external symbol

I've seen similar questions online that are problems with people forgetting to include certain things, etc. However I'm getting this error after checking out our code from subversion--others have done the same without getting this problem开发者_如何学Go. My question: is there anything that could've happened on my machine to cause this linker error, either in Visual Studio settings (but not something that would affect the .sln file) or outside Visual Studio?

Lnk2019, from here states:

unresolved external symbol 'symbol' referenced in function 'function'

Lnk2001, from here states

unresolved external symbol "symbol"

Edit: The LNK2019 errors result from the initial LNK2001 error (on a problem creating a certain dll). If I get that dll from someone else on our team (and adjust the creation date to tomorrow so VS won't delete it) I can edit and debug. Of course I would like to not resort to a workaround...


There's a chance that the library you were linked to was a local copy that no longer exists on your machine. We had this happen when someone imported a library dependency and used an absolute path from their C:\ drive to specify its location.


In addition to Tony's answer, this can also happen if you have an older version of the library higher in your lib search path then where the lib you built was copied to. I'd check all the places listed in:

"Tools->Options->Projects and Solutions->VC++Directories->"Show Directories for: Library Files."

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜