> -----Original Message-----
> From: Brian Henning [mailto:brian@stripped]
>
> % g++ -I/usr/local/include/mysql++ -o testmysql testmysql.cpp
>
> results in (as you experienced folks might guess) a huge
> vomitous mass of compiler errors.
>
Brian,
I'm using gcc on RHEL. These are some of the things I had to do to get my
stuff compiled:
1. Make sure I had all the necessary MySQL and MySQL ++ components:
a. Server
b. Client
c. Headers and Libraries
d. Shared Libraries
2. Had to run the following command to configure my shared libraries
/sbin/ldconfig /usr/local/lib
And add the following line to /etc/ld.so.conf
/usr/local/lib
3. In my makefile include the proper libs. For example I have the following
macro substitutions in my makefile:
# Specify include path for mySQL header files
CCFLAGS += -I/usr/include/mysql
# Specify include path for mySQL++ header files
CCFLAGS += -I/usr/local/include/mysql++
# Specify include path for mySQL client library
LDFLAGS += -L/usr/lib/mysql -lmysqlclient
# Specify include path for mySQL++ library
LDFLAGS += -L/usr/local/include/mysql++ -lmysqlpp
Hope this helps,
Steve
This e-mail and any attachments are provided through AEgis
Technologies' e-mail services and may contain company sensitive and/or
privileged information. If you are not the intended recipient, please
notify the sender immediately by return e-mail, delete this e-mail and
destroy any copies. Any dissemination or use of this information by a
person other than the intended recipient is unauthorized and may be
illegal.