I’m using Eclipse, and I get errors saying “Unresolved inclusion: mysql_connection.h and similar errors at all the #include statement related to the mysql headers and usage of other keywords related to mysql in the program.
I have installed the complete setup of the mysql server.
so i think its linker error , my question is that How do I link to mysql to c++ in eclipse or some other solution?
can some pls suggest me the steps or relevant links so that i could run my c++ program in eclipse.
thanks 🙂
I have never used Eclipse before. However, your little error that says “Unresolved inclusion: mysql_connection.h” suggests that the compiler has no idea where to find your header files. So, I would double check to see if your include paths are correct. To use MySQL Connector/C (I’m assuming that is what you’re using…), you will also need to link to two libraries: -lmysqlclient, and -lz. You should make sure that your library include paths are also correct.
Once you get everything compiling, you might want to check out a simple C++ api that I wrote for MySQL. http://www.nwehr.com -> Source -> NDMySQL.