When I was running a build in travis-ci, the following error occurred. The code uses jsoncpp, and libcurl. I tried linking the individual objects but they also errored.
$ g++ -I ./vcpkg/installed/x64-linux/include/ -L ./vcpkg/installed/x64-linux/lib/ test.cpp -o buildtest.exe
/tmp/ccRtnnbm.o: In function `CurlGetResponse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*)':
test.cpp:(.text+0x1b9): undefined reference to `Json::CharReaderBuilder::CharReaderBuilder()'
test.cpp:(.text+0x1c8): undefined reference to `Json::CharReaderBuilder::newCharReader() const'
...
collect2: error: ld returned 1 exit status
The command "g++ -I ./vcpkg/installed/x64-linux/include/ -L ./vcpkg/installed/x64-linux/lib/ test.cpp -o buildtest.exe" exited with 1.
Aucun commentaire:
Enregistrer un commentaire