List:MySQL++« Previous MessageNext Message »
From:Ina J. Date:March 14 2012 1:55pm
Subject:Re: Library including problem
View as plain text  
Sorry for that. Don't know what button did I hit, but Gmail just sent the
message. Continuing with the problem.

g++ gives me this when I try to make the code:

In file included from test.cc:3:
/usr/include/mysql++/ssqls.h:38:44: warning: anonymous variadic macros were
introduced in C99
In file included from /usr/include/mysql++/connection.h:38,
                 from /usr/include/mysql++/mysql++.h:56,
                 from test.cc:2:
/usr/include/mysql++/common.h:158: warning: ISO C++ 1998 does not support
'long long'
/usr/include/mysql++/common.h:159: warning: ISO C++ 1998 does not support
'long long'
In file included from /usr/include/mysql++/common.h:189,
                 from /usr/include/mysql++/connection.h:38,
                 from /usr/include/mysql++/mysql++.h:56,
                 from test.cc:2:
/usr/include/mysql/mysql.h:132: warning: ISO C++ 1998 does not support
'long long'
In file included from /usr/include/mysql++/row.h:33,
                 from /usr/include/mysql++/result.h:40,
                 from /usr/include/mysql++/query.h:37,
                 from /usr/include/mysql++/mysql++.h:58,
                 from test.cc:2:
/usr/include/mysql++/mystring.h:70: warning: ISO C++ 1998 does not support
'long long'
/usr/include/mysql++/mystring.h:72: warning: ISO C++ 1998 does not support
'long long'
/usr/include/mysql++/mystring.h:76: warning: ISO C++ 1998 does not support
'long long'
/usr/include/mysql++/mystring.h:78: warning: ISO C++ 1998 does not support
'long long'
g++ -std=c++98 -Wall -pedantic -Wextra -g -pthread -Bsymbolic-functions
-rdynamic -L/usr/lib/mysql++ -lmysqlclient -lmysqlpp -o testprog test.o


Obviously, the program compiles and those are just warnings, but on FreeBSD
the compiler exists when a warning comes ahead and I don't like warnings
either.

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 test.cc
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??


So I've been using the library all the time with the "mysql++"-path prefix
on Ubuntu. The very same includes doesn't work on FreeBSD and g++ gives
those 'long long' warnings and exits. Then I tried to reproduce the problem
with my Ubuntu and figured out that by removing the prefixes, the result is
the same.

If I can solve the warnings with Ubuntu I can figure the rest out by myself
with FreeBSD, but now I'm so confused I have to ask for help.

-Ina

Thread
Library including problemIna J.14 Mar
  • Re: Library including problemIna J.14 Mar
    • Re: Library including problemJonathan Wakely14 Mar