Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am still a newbie at Linux, and I am trying to get some C/C++ code to compile and run that will connect to a MySQL database on a Windows 2000 computer on my network.
I cannot get any code to compile if I do any more than:
#include "/usr/local/mysql/mysql.h"
..
..
MYSQL *test;
MYSQL_ROW row;
MYSQL_RES res;
if i try to do mysql_connect() i get the error 'mysql_connect undeclared'
I use the compile command:
gcc main.o main.cpp -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient
the include and library files for mysql are in the /usr/local/mysql directory
I have not actually installed mysql on the linux box since I am trying to connect to the windows box.
Check the pathname to that header file -- on my system it's located at /usr/local/mysql/include/mysql/mysql.h. You're probably better off with something like:
I realize that I have a different path other than /root/mysql/include , but i have tried both ways with no luck.
From a friend, I was told that if i install the RPM for mysql it should make a folder in the /usr/local/include, but I have not been able to get it to do that either!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.