1

I followed resthub github for building the library

mkdir build && cd build
cmake -DBUILD_SSL=OFF -DBUILD_EXAMPLES=ON -G "Visual Studio 15 2017" ..
msbuild INSTALL.vcxproj

It successfully created distibution folder. I added those in my sample restbed project as shown below enter image description here

enter image description here

But I am getting the link error as shown below when buildingi What am I doing wrong?

drescherjm
  • 10,365
  • 5
  • 44
  • 64
JibinNajeeb
  • 784
  • 1
  • 10
  • 31
  • It's better to copy the actual text of the error messages from the Output tab instead of a picture of the errors list. – drescherjm Aug 04 '20 at 12:47
  • 1
    Looks like you added the library directories to the linker setting but not a library to the linker->input->additional dependencies so unless the library has a `#pragma comment(lib,libname.lib)` in a header you are not linking to the required library. – drescherjm Aug 04 '20 at 12:50

1 Answers1

1

There are three steps to add a lib:

Properties->C/C++->General->Additional Include Directories

Properties->Linker->General->Additional Library Directories

Properties->Linker->Input->Additional Dependencies

Also, you could refer to this link about lnk2019.

Barrnet Chou
  • 1,738
  • 1
  • 4
  • 7
  • Ah yes, I forgot to add Input. Thanks for pointing it out – JibinNajeeb Aug 05 '20 at 05:50
  • came across to same problem, care to share what excat lib solved the above error ? it seems it's not recognizing the std::wstring. and not complaining about any swagger generated lib files... – IdanB Apr 28 '22 at 05:50