I've read through all of the posts on connecting to mysql, but I still don't have a clear understanding of the steps...
-- I have libmysql.a and libmysql.def in my LIB directory. Now what syntax do I need to add to the compiler and/or linker project options?
-- What file(s) do I #include in my code?
-- Do I still need the mysql.h files anywhere?
One day maybe I'll write up some thorough documentation on this mess as it doesn't appear to be anywhere else...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Copy mysql.h, mysql_com.h and mysql_version.h into your include dir, copy libmysql.a into your lib dir (you don't need the def file anymore once you have the .a).
Include mysql.h in your source, define -lmysql as your project's linker option.
Copy libmysql.dll into your project's dir or somewhere on your path. Once I tried linking the static lib but something went wrong, never tried again.
rpeter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've read through all of the posts on connecting to mysql, but I still don't have a clear understanding of the steps...
-- I have libmysql.a and libmysql.def in my LIB directory. Now what syntax do I need to add to the compiler and/or linker project options?
-- What file(s) do I #include in my code?
-- Do I still need the mysql.h files anywhere?
One day maybe I'll write up some thorough documentation on this mess as it doesn't appear to be anywhere else...
Copy mysql.h, mysql_com.h and mysql_version.h into your include dir, copy libmysql.a into your lib dir (you don't need the def file anymore once you have the .a).
Include mysql.h in your source, define -lmysql as your project's linker option.
Copy libmysql.dll into your project's dir or somewhere on your path. Once I tried linking the static lib but something went wrong, never tried again.
rpeter
Thanks, got it working. -- Ray