[pdal] LNK2019 for PDAL with Arbiter and static cURL
Mateusz Loskot
mateusz at loskot.net
Fri Oct 19 05:11:28 PDT 2018
Hi,
Today I enountered a problem while building PDAL with
cURL enabled using VS2017 on Windows.
Everything compiled, but I got a bunch of linker errors
LNK2019 unresolved external symbol
for cURL's calls being unresolved and referenced by arbiter.
BTW, static built libcurl.lib I passed to CMake was passed to linker.
The workaround that worked for me was to edit vendor/arbiter/arbiter.hpp
and add #define CURL_STATICLIB in here:
#ifdef ARBITER_CURL
#define CURL_STATICLIB
#include <curl/curl.h>
#else
typedef void CURL;
#endif
Has anyone experienced that?
There seem to be no CMake option or define expected by
either PDAL or Arbiter to tell those to use static cURL
and stick the CURL_STATICLIB define before curl.h include.
There seem to be nothing related to use of static cURL
in the docs or AppVeyor scripts.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the pdal
mailing list