Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > Linux
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Linux General discussion of programming the various flavors of Linux operating systems.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Linux section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 15th, 2006, 04:47 PM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting to MYSQL from C / C++ ?

I’ve just installed fedora 6.
In my free time I’m trying to work on a project as much as possible. What I want too do is to connect to MySql from C.

I’ve read the MYSQL chapter from Beginning Linux Programming – 3rd edition but it seams that I can’t connect to the mysql from C because I do not have the “mysql.h” library on my system.
The mysql shell utility is working just fin and the actual chapter form the book is not saying anything about what to do in this case.

connect1.c contains the code that I’m trying to compile
Code:
#include <stdlib.h>
#include <stdio.h>
#inlcude “mysql.h”

int main (void)
{
    return 0
}
The compile commands that the book say that shod work in most of the cases are:
Code:
$ gcc -I/usr/include/mysql connect1.c -L/usr/lib/mysql -lmysqlclient -lz -o connect1

ore
Code:
$ gcc -I/usr/include/mysql connect1.c -lmysqlclient -o connect1

The problem is that it was impossible for me too find in my hole directory structure a file cooled mysql.h.



A big inconvenient is that I’m using a dialup connection. The internal modem that I use is a winmodem so “No Linux drivers”. All that I can do is just download from windows the files and then copy them too fedora.

Please do help me.


Reply With Quote
  #2 (permalink)  
Old December 15th, 2006, 10:50 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

http://www.ucl.ac.uk/is/mysql/c/

www.crmpicco.co.uk
www.ie7.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting mysql to php?? Manu Sharma BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 March 5th, 2007 01:40 AM
Connecting To MySQL from PHP AlisP2P MySQL 1 January 4th, 2006 02:27 AM
Connecting to mySQL WIx ASP.NET 1.0 and 1.1 Basics 3 October 17th, 2004 04:13 PM
connecting to mysql using Php webmoron BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 6 August 24th, 2004 04:30 AM
connecting mysql with vb ks_anoop MySQL 3 February 5th, 2004 02:43 PM



All times are GMT -4. The time now is 07:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.