Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] Modifying the Hylafax source code to interact with MySQL
Error messages while running ‘make’ :-
FileTransfer.o(.text+0x144): In function `HylaFAXServer::InsertSQL(char*)':
/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:119: undefined reference to `mysql_init'
FileTransfer.o(.text+0x174):/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:121: undefined reference to `mysql_options'
FileTransfer.o(.text+0x1ab):/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:122: undefined reference to `mysql_real_connect'
FileTransfer.o(.text+0x1bb):/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:123: undefined reference to `mysql_error'
FileTransfer.o(.text+0x1da):/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:127: undefined reference to `mysql_select_db'
FileTransfer.o(.text+0x1ea):/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:128: undefined reference to `mysql_error'
FileTransfer.o(.text+0x219):/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:132: undefined reference to `mysql_query'
FileTransfer.o(.text+0x22f):/var/fax/hylafax-4.1.8/hfaxd/FileTransfer.c++:139: undefined reference to `mysql_close'
Where should I make changes in the ‘make’ file to compile the modified code properly!
I dont know specifically about the HylaFax Makefile, but inorder to
compile anything with the mysql libraries you need a couple of things.
Somewhere, you need to include the mysql header:
#include <mysql/mysql.h>
Also, you need to add -I and -L tags to compilation so that the mysql
libraries are included and linked against:
-L/usr/lib/mysql
-I/usr/include/mysql
Of course, these paths are site dependent.
Also, you may need to pass a couple of options to the linker with
command line options to gcc:
-lmysqlclient
-lm
-lgcc
Hope that helps. To debug, change lines in the HylaFax makefile to echo
gcc commands rather than execute them - then you can see what command
line options gcc is getting, and work on adding the ones I have described.
Good Luck.
--
--------------------------------------------
| Caleb Phillips |
| Oregon Advocacy Center |
| IT Specialist |
| |
| Handcrafted for you in Mozilla Mail 1.4a |
--------------------------------------------
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxxxxx*