jpbarrette / curlpp

C++ wrapper around libcURL
http://www.curlpp.org
1.68k stars 360 forks source link

myRequest.setOpt<Url>() results in linker error "Unresolved External Symbol" #137

Closed sigmarsson closed 2 years ago

sigmarsson commented 2 years ago

image

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="curl" version="7.30.0.2" targetFramework="native" />
  <package id="curl.redist" version="7.30.0.2" targetFramework="native" />
  <package id="curlpp" version="0.7.3.1" targetFramework="native" />
  <package id="curlpp.redist" version="0.7.3.1" targetFramework="native" />
  <package id="libssh2" version="1.4.3.3" targetFramework="native" />
  <package id="libssh2.redist" version="1.4.3.3" targetFramework="native" />
  <package id="openssl" version="1.0.1.21" targetFramework="native" />
  <package id="openssl.redist" version="1.0.1.21" targetFramework="native" />
  <package id="zlib" version="1.2.8.1" targetFramework="native" />
  <package id="zlib.redist" version="1.2.8.1" targetFramework="native" />
</packages>

1>licenseclient.obj : error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function "public: void __thiscall curlpp::internal::CurlHandle::option<void *>(enum CURLoption,void *)" (??$option@PAX@CurlHandle@internal@curlpp@@QAEXW4CURLoption@@PAX@Z)

Compiler command

/JMC /permissive- /Yu"pch.h" /ifcOutput "Debug\" /GS /analyze- /W3 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"Debug\vc143.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_DEBUG" /D "WEATHERHISTORYLICENSE_EXPORTS" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MDd /std:c++14 /FC /Fa"Debug\" /EHsc /nologo /Fo"Debug\" /Fp"Debug\Weather.History.License.pch" /diagnostics:column

sigmarsson commented 2 years ago

Must confess that I earlier added a definition. I encounter a different error if omit that #define CURLPP_STATICLIB

image