0

I am trying to run the program detailed here. The code requires the cURL and JSON libraries, and I've been following the direction here

I'm having trouble running the program - when I compile I get unresolved external symbol linker errors for both cURL and JSON, so I seem to have done something wrong.

I'm a complete novice when it comes to programming, so any advice would be appreciated

2 Answers2

0

As you can see in my post I specified custom path to include and library directories for compiler as follow:

g++ -g -Wall -Ilibs/include -Llibs/lib -o prog prog.cpp CURLWrapper.cpp -lcurl -ljson_linux-gcc-4.5.2_libmt

replace I[libs/include] -L[libs/lib] paths with directories where are your put libraries (cURL and JSON).

Darius Kucinskas
  • 10,193
  • 12
  • 57
  • 79
0

You should pass the jsoncpp library header address and compiler flags to your compiler. for example for g++ you should do like this:

g++ -I/usr/include/jsoncpp/ -ljsoncpp yourCode.cpp
sajjadG
  • 2,546
  • 2
  • 30
  • 35