Answer the question
In order to leave comments, you need to log in
How to connect mariadb in c++?
I'm trying to connect mariadb to a C++ program. mysql.h is in /usr/include/mariadb, libmariadb.so is in /usr/lib/mysql/lib/mariadb, installed from the repository named libmariadb3 and libmariadb-dev.
The program contains the #inclide command, which is always scolded like this:
/usr/bin/ld: cannot find -lmysql.h
clang: error: linker command failed with exit code 1 (use -v to see invocation)
CMakeFiles/mysql_debug.dir/build.make:94: recipe for target 'mysql_debug' failed
make[2]: *** [mysql_debug] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/mysql_debug.dir/all' failed
make[1]: *** [CMakeFiles/mysql_debug.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question