Archicad C++ API
About Archicad add-on development using the C++ API.

LNK2019 and LNK2001 error -- when installed cpprestsdk.v141 by nuget

takahiro
Participant

hello,

 

When I installed cpprestsdk.v141  by nuget,  some errors occurred,

This is one of them,

 

LNK2019	unresolved external symbol "__declspec(dllimport) public: __cdecl web::uri::uri(unsigned short const *)" (__imp_??0uri@web@@QEAA@PEBG@Z) referenced in function "public: __cdecl <lambda_e44ff673cc7fd7d38ac197560221d1e5>::operator()(void)const " (??R<lambda_e44ff673cc7fd7d38ac197560221d1e5>@@QEBA@XZ)
LNK2001	unresolved external symbol "public: virtual class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __cdecl web::http::details::_http_request::to_string(void)const " (?to_string@_http_request@details@http@web@@UEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ)

 

 

Windows10

API development Kit 24.3009

ArchiCAD24

VisualStudio2019

platform tools - VisualStudio 2017

Windows SDK Ver - 10.0.17763.0

 

Any ideas on how to fix??

2 REPLIES 2
Mihaly Palenik
Graphisoft
Graphisoft

Hello,

it seems to me some libraries (might be cpprestsdk realted) have not been added to your visual studio project. I hope this will help you:

Hi,

Thank you for your advice.

 

I have a question.

Which files should I add, as the library is installed by "nuget" in VisualStudio?
Is this file below correct?

 

[My Projects]\packages\cpprestsdk.v141.2.10.12.1\build\native\x64\lib\cpprest141_2_10.lib

[My Projects]\packages\cpprestsdk.v141.2.10.12.1\build\native\x64\lib\cpprest141_2_10d.lib