Wireshark mailing list archives
Re: I want to modify the Makefile to add some lib of mysql
From: Stephen Fisher <steve () stephen-fisher com>
Date: Sun, 5 Dec 2010 12:08:23 -0700
On Sun, Dec 05, 2010 at 11:36:12PM +0800, 刘昆 wrote:
To be specific,I want add "/usr/include/mysql/mysql.h" header file and link "libmysqlclient.so" lib to do my work. So how should I do to?
The quickest way would be to set some environment variables before you run the configure script. According to configure --help, you can set "LIBS" to set the "libraries to pass to the linker" and CPPFLAGS to pass the include directory for mysql to the C preprocessor. If the mysql library isn't in a standard place on your system, you can pass an additional library directory with LDFLAGS. For example: (csh/tcsh) setenv LDFLAGS -L/usr/local/lib/mysql setenv LIBS -lmysqlicient setenv CPPFLAGS -I/usr/include/mysql (sh/bash/etc) export LDFLAGS=-L/usr/local/lib/mysql export LIBS=-lmysqlclient export CPPFLAGS=-I/usr/include/mysql (You may not need to set LDFLAGS) Then in packet-http.c, just do "#include <mysql/mysql.h>" and use the functions provided by MySQL. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- I want to modify the Makefile to add some lib of mysql 刘昆 (Dec 05)
- Re: I want to modify the Makefile to add some lib of mysql Stephen Fisher (Dec 05)