Install and setup GTK+ and MySQL in Windows

  • Install Dev C++ (devcpp)
  • Install gtk-dev-2.8.6.DevPak
  • Install mysql.devPak
  • Install mysql
  • gtk_win32_devel_2.8.6_rc3.exe
  • gtk-2.8.6-runtime.exe
  • mysql-4.0.14b-win-noinstall.zip
  • In Dev C++, do the following steps:

  • Add all of Dev_cpp/ lib to Project->ProjectOptions
  • Add libmysql-lib to above also
  • Copy MySQLLib.dll into windows/system32 and this gets rid of the mysql DLL runtime error.
  • Remove files not recognized during build such as ../lib/jpeg-bcc.lib.
  • To overcome the GtkBox error, put -mms-bitfields in the Project->Compiler Options i.e. Tools->Compiler Options->Check box. Add -mms-bitfields into it.
  • Using C API with MySQL, there is no need to have ODBC or any other DSNs.
  • In code, put #include
    #include
  • Put libmysql.lib, mysqlclient.lib in the compiler options.
  • Include /library files.