0

So im trying to use the nuget package casablanca in my project. When im building my projects hes creating the project.lib and also a casablanca.dll. But when i try to build my main project with the exe there are Linker erorrs. So im wondering now why are there LNK errors when using a nuget package?

I tried to add the casablanca.lib from the microsoft sdk folder but that doesnt help. Did anyone have similar problems??

im getting errors like :

18 error LNK2019: unresolved external symbol ""__declspec(dllimport) public: __thiscall web::json::value::value(void)" (_imp??0value@json@web@@QAE@XZ)"
Hannes
  • 442
  • 1
  • 6
  • 23
  • possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – πάντα ῥεῖ Apr 29 '14 at 09:37
  • Have u added the lib file using #pragma in your main file? If not, please add it in your code – DTdev Apr 29 '14 at 09:38
  • yes i added #pragma comment(lib, "C:/Program Files (x86)/Microsoft SDKs/Cpp REST SDK for Visual Studio 2013/SDK/lib/x86/Release/casablanca120.lib") to my main.cpp and my cpp file where i use the lib... – Hannes Apr 29 '14 at 09:40
  • Please add the library path to visual studio settings and just write .lib file name in #pragma. It is having lots of spaces and \ symbol. Sometimes it may lead to this problem. – DTdev Apr 29 '14 at 09:43
  • ok i did it that way but im still getting the exact same errors, i think its maybe an outdated lib because its 120 and the actual nuget package is 2.0. But i cant find any other lib file... – Hannes Apr 29 '14 at 09:55
  • ok found the 2.0.lib file but im still getting link errors.. error LNK2001: unresolved external symbol ""__declspec(dllimport) public: class pplx::task __thiscall web::http::client::http_client::request(class web::http::http_request,class pplx::cancellation_token)" (_imp(__imp_?request@http_client@client@http@web@@QAE?AV?$task@Vhttp_response@http@web@@@pplx@@Vhttp_request@34@Vcancellation_token@6@@Z)". – Hannes Apr 29 '14 at 12:06

0 Answers0