Jump to content



Photo
- - - - -

C Mysql


  • Please log in to reply
8 replies to this topic

#1 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 28 February 2008 - 07:56 AM

I would stick this in Free Discussion but this is a programming forum and C is programming XD

I am trying to create a program the can connect to a MySQL Database. I have downloaded the thing from MySQL and have the libs and includes. I have stuck them inside the Dev C++ includes and libs folders and the program builds when include mysql header. Then when I tried to use the connect to mysql function it said it could not be found.

I then read the docs and found u also need to include another header called my_sys. When I included it it came up with a whole load of errors with the header file. Does anyone know whats wrong, and have any of u done MySQL with C WIN32 API yet?

#2 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 28 February 2008 - 11:25 AM

a whole load of errors with the header file.

..is not very descriptive. I don't see any code either :P

I'll just give you a tip, to check out http://www.sqlite.org/ unless you must use MySQL.

#3 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 28 February 2008 - 12:01 PM

OK ill just get the errors now XD and the code.

Also I dont care what kind of database I use. Im jsut used to mySQL from my days with PHP XD

#4 kucalc

kucalc

    Casio Maniac

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly<br /><br />Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 28 February 2008 - 07:18 PM

Did the MySQL library come as a Dev-C++ package or did you manually extract an archive?

#5 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 29 February 2008 - 01:31 AM

I manually extracted it. I had to download the full MySQL zip file from MySQL and then I took the includes and libs.

#6 kucalc

kucalc

    Casio Maniac

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly<br /><br />Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 29 February 2008 - 05:17 AM

Hmmm, where did you get this library? Does it say it's meant to be used with GCC tools or Microsoft tools?

#7 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 29 February 2008 - 05:27 AM

http://dev.mysql.com.../5.0.html#win32
I got the mysql-5.0.51a-win32 pack.

I read that it needed to be extracted in C:/ but i just needed the library and includes.

Did I get the wrong one. If I did do u know where I can get the proper one from? XD

#8 kucalc

kucalc

    Casio Maniac

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly<br /><br />Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 04 March 2008 - 05:27 AM

Well, I Googled around and found a good tutorial for setting up Dev-C++, ODBC and MySQL:

http://www.sptk.net/...evcpp/mysql.htm

#9 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 04 March 2008 - 05:34 AM

thanx XD.

I will give that a go. And thanx again XD




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users