Search This Blog

Tuesday, July 7, 2009

LNK2019: unresolved external symbol

Visual studio does not know against which library it should link.

you need to include the library under

Project >> Properties >> Configuration Properties >> Linker >> Input >> Additional Dependencies

You need to include the library path under

Project >> Properties >> Configuration Properties >> Linker >> General >> Additional Library Directories

- Mihir Patel

6 comments:

Anonymous said...

Thanks, this helped resolve my issue. I didn't really know how to add "references" in VC++.

Anonymous said...

Thanks, this was very helpful.

Anonymous said...

Thanks!!! This really helped. I couldn't find one useful link until I read your post.

Anonymous said...

This is incredibly helpful. You are the man.

Mike P-J said...

Very helpful indeed. I knew that the settings were buried in there somewhere, but having your blog post saved me a lot of time. Thanks, Mike.

jakob said...

Any ideas how to do the same on the command line (I am using cygwin).

I can compile and run a simple file: cl hello.cpp
./hello.exe

Includes are also fine using

cl main.cpp /I ./include

but how about linking?

I tried

cl main.cpp /I ./iinclude /link ./lib

but still getting unresolved external symbol.

Any ideas?