Dynamically Linked mySQLProgram
I have written a program which performs basic actions on a mySQL database. This program is intended to be run on my web host's server, but does not have the required files to compile on that machine or use a dynamically linked executable on there.
Thus I am left with having to compile a statically linked version on my local machine and upload from there.
I'm having great difficulty in compiling it this way though.
I do this:
But get this:
g++ -static generaltest.cpp -ogentest -L /usr/lib/mysql -lmysqlclient
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0xaa): undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
my_compress.o(.text+0x13c): undefined reference to `compress'
collect2: ld returned 1 exit status
Scary! This doesn't happen when I do not use the -static though. Am I doing something wrong?
Any help on what I need to do would be greatly appreciated.