List:MySQL++« Previous MessageNext Message »
From:Ibrahim Mubarak Date:December 14 2004 6:35pm
Subject:Re: Compiling a MySQL++ / ClanLib project [mysql++.h's includes not found by g++] [SOLVED]
View as plain text  
--- Chris Frey <cdfrey@stripped> wrote:

> It appears that you are using the default implicit rules to compile the
> *.cpp files into *.o files.  In this case, GNU Make looks for CFLAGS
> for C files and CXXFLAGS for C++ files.
> 
> I'm not sure how you're managing to use the implicit rules for .cpp files
> instead of .cc files, but maybe I've forgotten something about make. :-)

I am not sure either, I just grabbed the sample Makefile from the ClanLib project, then
read
enough of the Make manual to be able to create my own project. But basically, the Makefile
stayed
mostly unchanged. After the addition of the MySQL++ lib, I tried to mess with both ClanLib
and
MySQL++ sample Makefiles. But I guess that even after all that, I still don't know too
much about
how make really works. Gonna hit that tutorial again ;). 

> Anyway, the -I/usr/include/mysql++ arguments need to be in these environment
> variables when compiling, not just linking.  Your makefile snippet only
> shows the linking step.

I am sure you are right. As a matter of fact, Warren is saying just about the same thing.

--- Warren Young <mysqlpp@stripped> wrote:

> Try:
> 
> MYSQLINC = -I/usr/include/mysql++ -I/usr/include/mysql
> MYSQLIB = -lmysqlpp -lmysqlclient
> CPPFLAGS = `pkg-config --cflags $(PACKAGES)` $(MYSQLINC)
> LIBS = `pkg-config --libs $(PACKAGES)` $(MYSQLLIB)
> 
> instead.  Also, study examples/Makefile.simple.

Thanks, that fixed it right up. Now I understand a little more of what goes on ;).

ib


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
Thread
Compiling a MySQL++ / ClanLib project [mysql++.h's includes not found by g++]Ibrahim Mubarak13 Dec
  • Re: Compiling a MySQL++ / ClanLib project [mysql++.h's includes not found by g++]Chris Frey13 Dec
    • Re: Compiling a MySQL++ / ClanLib project [mysql++.h's includes not found by g++] [SOLVED]Ibrahim Mubarak14 Dec
  • Re: Compiling a MySQL++ / ClanLib project [mysql++.h's includes notfound by g++]Warren Young14 Dec