List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:March 14 2012 1:58pm
Subject:Re: Library including problem
View as plain text  
On 14 March 2012 13:55, Ina J. wrote:
> g++ gives me this when I try to make the code:

All those warnings are because you're using -pedantic

> But here is the strange part: When I change the includes as follows:
> //MySQL++ includes
> #include <mysql++/mysql++.h>
> #include <mysql++/ssqls.h>
> #include <mysql++/connection.h>
> #include <mysql++/query.h>
> The g++ output is:
> g++ -std=c++98 -Wall -pedantic -Wextra -g -pthread -I/usr/include/mysql
> -I/usr/include/mysql++ -c -o  test.o
> g++ -std=c++98 -Wall -pedantic -Wextra -g -pthread -Bsymbolic-functions
> -rdynamic -L/usr/lib/mysql++ -lmysqlclient -lmysqlpp -o testprog test.o
> Why does it compile without warnings??

Because now the compiler finds the header <XXX.h> at
/usr/include/XXX.h and that means GCC considers it a system header, so
suppresses warnings.

You can make the warnings always happen with -Wsystem-headers, or make
them never happen by not using -pedantic
Library including problemIna J.14 Mar
  • Re: Library including problemIna J.14 Mar
    • Re: Library including problemJonathan Wakely14 Mar