Menu

Dev-C++ and MySQL

2002-09-18
2012-09-26
  • Ray Gurganus

    Ray Gurganus - 2002-09-18

    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...

     
    • Nobody/Anonymous

      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

       
    • Nobody/Anonymous

      Thanks, got it working.  -- Ray

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.