Wireshark mailing list archives

Re: I want to modify the Makefile to add some lib of mysql


From: 刘昆 <liukunmeister () gmail com>
Date: Fri, 07 Jan 2011 11:32:31 +0800

于 2010年12月06日 03:08, Stephen Fisher 写道:
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
If I export CPPFLAGS=-I/usr/include/mysql

Why should I use "#include<mysql/mysql.h>"  not "#include<mysql.h>" ?
___________________________________________________________________________
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: