mysql2300 installation with XAMPP

Question

Hi all,

How will I have to modify the Makefile to get mysql2300 running on a Linux Box with XAMPP ?

Trying to install gave me :

# make mysql2300
gcc -Wall -O3 -DVERSION=\"1.10\" -o mysql2300 mysql2300.c rw2300.c linux2300.c -lm  -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
mysql2300.c:28:19: mysql.h: No such file or directory
mysql2300.c: In function `main':
mysql2300.c:71: error: `MYSQL' undeclared (first use in this function)
mysql2300.c:71: error: (Each undeclared identifier is reported only once
mysql2300.c:71: error: for each function it appears in.)
mysql2300.c:71: error: syntax error before "mysql"
mysql2300.c:176: warning: implicit declaration of function `mysql_init'
mysql2300.c:176: error: `mysql' undeclared (first use in this function)
mysql2300.c:182: warning: implicit declaration of function `mysql_real_connect'
mysql2300.c:187: warning: implicit declaration of function `mysql_errno'
mysql2300.c:187: warning: implicit declaration of function `mysql_error'
mysql2300.c:187: warning: format argument is not a pointer (arg 4)
mysql2300.c:193: warning: implicit declaration of function `mysql_query'
mysql2300.c:195: warning: format argument is not a pointer (arg 5)
mysql2300.c:196: warning: implicit declaration of function `mysql_close'
make: *** [mysql2300] Error 1

I suppose this happens because of the following entries in Makefile:

..
..
mysql2300:
        $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLA
GS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
..
..

What exactly will I have to change, in order to make it work ?

Thanks in advance

Clemens

Environment

Open2300 version: 1.10
Libraries:  
Server OS: SUSE 9.20

-- ClemensKlimczok? - 10 Mar 2006

Answer

I have no idea what XAMPP is.

But have you installed mysql including header files?

In an rpm based distribution such as RedHat the two rpms needed are mysql and mysql-devel. I believe Suse is RPM based. Do you have mysql-devel installed?

-- KennethLavrsen - 10 Mar 2006

Question

Hi Kenneth,

thanks for your quick reply.

XAMPP is an apache-mysql-php-perl bundle. I did not install mysql using RPMs, but I guess mysql was installed including header files. XAMPP is by default installed in /opt/lampp

searching within this directory gave me:

apache:/opt/lampp # find . -name mysql
./bin/mysql
./lib/php/tests/DB/tests/mysql
./lib/mysql
./lib/perl5/site_perl/5.8.7/i686-linux/DBD/mysql
./lib/perl5/site_perl/5.8.7/i686-linux/auto/DBD/mysql
./var/mysql
./var/mysql/mysql
./share/mysql
./htdocs/support/vps/apache/database/mysql
./htdocs/support/mysql
./licenses/mysql

which of these files will I have to use in the Makefile instead of /usr/include/mysql and /usr/lib/mysql ?

Kind Regards, Clemens

P.S.

The devel-packages were missing after I re-installed the XAMPP-Bundle. I fixed this problem and changed the Makefile to:

mysql2300:
        $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/opt/lampp/include/mysql -L/opt/lampp/lib/mysql -l/opt/lampp/lib/mysql/libmysqlclient.so.15

After executing mysql2300 I get:

apache:/opt/lampp/htdocs/open2300-1.10 # make mysql2300
gcc -Wall -O3 -DVERSION=\"1.10\" -o mysql2300 mysql2300.c rw2300.c linux2300.c - lm  -I/opt/lampp/include/mysql -L/opt/lampp/lib/mysql -l/opt/lampp/lib/mysql/lib mysqlclient.so.15
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: cannot find -l/opt/lampp/lib/mysql/libmysqlclient.so.15
collect2: ld returned 1 exit status
make: *** [mysql2300] Error 1

Here's the content of the directory

apache:/opt/lampp/lib/mysql # ll
total 4622
drwxrwxr-x   2 root root     456 Oct 29 17:26 .
drwxr-xr-x  10 root root    6632 Oct 29 17:26 ..
-rw-r--r--   1 root root   11870 Oct 24 16:49 libdbug.a
-rw-r--r--   1 root root   45062 Oct 24 16:49 libheap.a
-rw-r--r--   1 root root  322168 Oct 24 16:49 libmyisam.a
-rw-r--r--   1 root root   27662 Oct 24 16:49 libmyisammrg.a
-rw-r--r--   1 root root 1467890 Oct 24 16:49 libmysqlclient.a
-rwxr-xr-x   1 root root     903 Oct 24 16:49 libmysqlclient.la
lrwxrwxrwx   1 root root      24 Mar  4 10:43 libmysqlclient.so -> libmysqlclient.so.15.0.0
lrwxrwxrwx   1 root root      24 Mar  4 10:43 libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
-rwxr-xr-x   1 root root 1303964 Oct 31 16:58 libmysqlclient.so.15.0.0
-rw-r--r--   1 root root 1210040 Oct 24 16:49 libmystrings.a
-rw-r--r--   1 root root  291714 Oct 24 16:49 libmysys.a
-rw-r--r--   1 root root   17152 Oct 24 16:49 libvio.a

So, this seems to be the only problem to be resolved now...
Topic revision: r4 - 11 Mar 2006 - 14:39:10 - ClemensKlimczok?
 
Open2300 - Support Question 2006x 03x 10x 145757
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback