简体   繁体   中英

how can I link mysql in dev-c++?

I tried a lot of solutions on google and baidu but none of them work. I downloaded and installed the 'MySQL.DevPak' file but still got the error 'mysql.h: No such file or directory'. Is there anybody done this before?

You probably have to declare the package to dev-c++. Look in the project configuration for 'Add an external library' and declare it there. DevC++ needs this to know where to look for 1) the header file, and 2) the actual library. And that is has to link the library into the executable.

Also, you might have to use #include <mysql/mysql.h> . At least in Linux, there's a mysql directory containing the actual mysql.h

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM