Cannot Include Libraries
Completed
Hello,
I'm searching to include 2 libraires in my project in C++ but CLion doesn't recognize the librairies in my code.
I've downloaded the librairies with vcpkg and CLion build with vcpkg.
The librairies :
- mysql-connector-cpp
- paho-mqtt
Here my CMakeLists :
My actual CLion's config :
Here one of my includes in my code :
Error : “mqtt/client.h” file not found.
Please sign in to leave a comment.
In the project tree create a directory my_test_directory
Move your “mqtt/client.h” into that directory.
CMakeLists.txt add this line
include_directories(my_test_directory)
Right click and reload cmake project.
I think I've finally found it.
I just had to change the include in my code. I haven't really been able to see if it works because I have a reference errors with MySQL, but I don't have any errors about mqtt.
But thanks anyway 😁