LNK2019 - I have already linked the libraries!

I am getting a LNK2019 error for a function that I am using from a custom library. I have already included the .lib file! My project is a Win32 console application. I am using the Console (/SUBSYSTEM:CONSOLE) option already. I have tried using all the different run-time options in the code generation options. I have included all the header files.

Any ideas what could cause this


Answer this question

LNK2019 - I have already linked the libraries!

  • Lawrence Parker

    include .lib project dependencies

    Kuphryn


  • John Faris

    @kuphryn

    I said in my original post that I have included the library...

    @non4m3

    Thanks for the suggestions. After fiddling with all the compiler settings I could find, I finally just closed Visual Studio, restarted and tried rebuilding the entire solution.

    Suddenly started working just fine.

    I wish I could report back what fixed the problem but it seems like just another of those "restart, rebuild" situations.

    Thank you very much to everyone for their help.


  • Manuel Burggraf

    Hi,
    that is the error for the unreseolved external symbol, so a possible problem is that you're not linking with the right library (project properties->linker->input->additional dependecies and maybe project properties->linker->general->additional library directories) or missing another library.
    It could also be a problem in your code and nothing wrong with the other libraries. Check if you're implementing the methods/functions that you're using.

    It would help if you posted the exact error message so we could try to help a bit more.



  • LNK2019 - I have already linked the libraries!