question

75521832 avatar image
0 Votes"
75521832 asked 75521832 commented

LNK2019 can't resolve

Before I post the question, I have read the following document.

I am programming a VoIP client with Qt and one of PJProject/LinphoneSDK (I have tried both of them) by the VS2019 Community and Qt Creator. But commonly use MSVC2019. It always get the error LNK2019 whatever library and code I put in. Can someone provide a solution?

Project configuration->VC++ Directories->Include Directories/Libraries has been config correctly.
linker-tools-error-lnk2019


101984-lnk2019.png


101985-code-1.png


c++
lnk2019.png (20.2 KiB)
code-1.png (4.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Viorel-1 avatar image
0 Votes"
Viorel-1 answered 75521832 commented

Probably you did not set some parameters, such as Linker -> Additional Dependencies, for all of configurations (which are displayed in dropdown lists of Project Properties.

If you know which library files (.lib) should be added, you can also insert #pragma lines to any file, for example:

#pragma comment( "lib", "somelibrary.lib" )

Check if the product’s documentation contains detailed instructions.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Set up parameters Linker->Additional Library Directories doesn't work, error still occur.
But 'Insert #pragma comment' works for me. Thanks for help.

0 Votes 0 ·