gnuplot-iostream
gnuplot-iostream copied to clipboard
CLion cannot find "gnuplot-iostream"
Hi there, I have cloned the gnuplot on mac. But when I am trying to include the gnuplot-iostream file. The system cannot find it. Can you give some hints to solve this problem? Thanks.
Sorry, I don't know anything about CLion. You probably need to set some option to tell it where to find headers (include files). And once you get it to find gnuplot-iostream, you'll then need to install boost and make sure it can find that.
@dzhao123 If you copy gnuplot-iostream.h into your projects source directory you just have to put it into your CMakeLists.txt.
Just add
find_package(Boost REQUIRED COMPONENTS iostreams system filesystem)
target_include_directories(yourTarget PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIRS})
target_link_libraries(yourTarget PUBLIC ${Boost_LIBRARIES})
${CMAKE_CURRENT_SOURCE_DIR}
is to find your local gnuplot-iostream.h
and then you have to link against the boost libraries needed for gnuplot-iostream.