Hi,
I am currently working on a server project that involves access to a MySQL DB. The server
will
both use ClanLib (a game SDK library) and MySQL++. I have been successful in building both
a
ClanLib-only project and a MySQL++-only project. The problem comes when I want them both
to work
together. I had a Makefile that worked for the ClanLib part. But when I added the MySQL++
headers,
g++ tells me things along the line of:
In file included from servercore.h:12,
from servercore.cpp:1:
/usr/include/mysql++/mysql++.h:1:22: platform.h: No such file or directory
/usr/include/mysql++/mysql++.h:3:18: defs.h: No such file or directory
...
I admit that I am new to this Makefile thing, but I did try to STFW and RTFM, but I am
stuck. I
did find a few Makefile examples bundled with both libraries and some floating around on
the web.
But I still can't understand how to fix any of them so that both libraries would compile.
Can you
tell me what exactly MySQL++ needs so that I can at least know what my goals are? ;)
Here is a Makefile that worked for ClanLib before I added MySQL++:
PACKAGES = clanCore-0.7 clanDisplay-0.7 clanApp-0.7 clanGL-0.7 clanNetwork-0.7
clanGUI-0.7
CPPFLAGS = `pkg-config --cflags $(PACKAGES)`
LIBS = `pkg-config --libs $(PACKAGES)`
+MYSQLFLAGS = -lmysqlpp -lmysqlclient -I/usr/include/mysql++ -I/usr/include/mysql
OBJS_SERVER = servercore.o
server: $(OBJS_SERVER)
- g++ -o server_core $(OBJS_SERVER) $(LIBS)
+ g++ -o server_core $(OBJS_SERVER) $(MYSQLFLAGS) $(LIBS)
clean:
-rm -f *.o server_core
Thanks,
ib
PS: I am under Debian/Linux SID with gcc/g++ 3.3 and MySQL++-[devel-]1.7.25-2 converted
from rpms
after rebuilding mysql++-1.7.25-1.src.rpm. mysql-client 4.0.22
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com