
January 30th, 2000, 10:43 AM
|
|
Registered User
|
|
Join Date: Jan 2000
Location: Cleveland, OH, USA
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hopefully this is just a really silly question:
I can't figure out where the MySQL library is at!
I'm using Linux RH 5.2 & MySQL installed by using the source RPM and doing rpm --rebuild [mysql.rpm]. I've done some quick tests and verified mysqld is working ok.
I found the include files:
/var/tmp/mysql/usr/include/mysql/mysql.h
The test program I wrote:
#include <stdio.h>
#include <sys/time.h>
#include </var/tmp/mysql/usr/include/mysql/mysql.h>
void main()
{
MYSQL_RES *result;
MYSQL_ROW row;
MYSQL *connection, mysql;
int state;
mysql_init(&mysql);
printf("Done.");
} // end void main()
I compile using g++:
/tmp/cca057881.o: In function `main':
/tmp/cca057881.o(.text+0x11): undefined reference to `mysql_init'
collect2: ld returned 1 exit status
If I compile under gcc I get the same error. I beleive this is because g++/gcc don't know where the libraries are at (and neither do I!)
Ideas?
Astro
|