Yes this question has been asked before ... I\'ve tried everything mentioned in the previous answers. My setup is really straightforward so this shouldn\'t be so hard.
In case you are as forgetful as me and didn't link the library in CMakeLists.txt:
target_link_libraries( mysqlcppconn)