Author Topic: mysql & visual studio  (Read 15213 times)

ygfperson

  • Founders
  • Posts: 601
  • Karma: +10/-1
    • Last.fm
mysql & visual studio
« on: July 23, 2005, 10:33:48 PM »
i understand the basic process of installing mysql and using it... i'm unsure of how to install its libraries. i think everything in linux is installed by default but i don't know if things like mysql.h come with the standard mysql download

basically my issue is that i have a program which references 'mysql.h' and i'm unsure what i install to make things work.

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14310
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
mysql & visual studio
« Reply #1 on: July 24, 2005, 10:27:55 AM »
I've never used the libraries in visual studio, but I assume you could use ADO or something like that to make the connection and run the queries.  I was unaware that there was a C/C++ library for mysql.  However, I assume that it has functions just like PHP that would be like mysql_connect(), mysql_select_db(), etc.

Have you found a readme/help file on the library?

ygfperson

  • Founders
  • Posts: 601
  • Karma: +10/-1
    • Last.fm
mysql & visual studio
« Reply #2 on: July 24, 2005, 01:52:05 PM »
the regular install comes with the c api apparently. i'm just wondering how i tell visual studio .net where all the include files and libraries are, or do i copy them manually? in linux a 'make install' would put all of the files in /usr/include and /usr/lib, i'm wondering if there's a similar function in visual studio

Perspective

  • badfish
  • Jackass In Charge
  • Posts: 4635
  • Karma: +64/-22
    • http://jeff.bagu.org
mysql & visual studio
« Reply #3 on: July 24, 2005, 11:01:13 PM »
Im pretty sure Visual studio has an "include" directory in its instal base somewhere. Try copying the header there.

sidenote: You can use ODBC to connect to the DB, then your app would be DBMS independant. The mysql specific lib might be easier to use though.

dpro

  • Me
  • Jackass I
  • Posts: 5
  • Karma: +10/-0
mysql & visual studio
« Reply #4 on: August 02, 2005, 03:56:44 PM »
I always use a couple of things when connecting the two together.

I use mysql++ (listed on the mysql website), and then always including the lib files from the mysql installation, as well as the mysql.h file from the include dir in the mysql installation.  Once you link the libmysql.lib and mysqlclient.lib along with including winsock.h (you MUST have this in your project for windows in any event), then you are set and it should compile easily.

Dumah

  • Jackass IV
  • Posts: 960
  • Karma: +21/-6
mysql & visual studio
« Reply #5 on: August 05, 2005, 04:48:08 PM »
Tools.Options.Projects.VC++Directories

Set your includes and libs there.

Personally, I avoid the MySQL APIs. I do everything via ADO and the MyODBC driver. But it's a matter of personal choice.

ygfperson

  • Founders
  • Posts: 601
  • Karma: +10/-1
    • Last.fm
mysql & visual studio
« Reply #6 on: August 05, 2005, 11:08:55 PM »
I ended up just copying the files into the right directories before I read the compile instructions that winmyth (the program i was trying to compile) provided.  of course the instructions covered this little thing.