List:MySQL++« Previous MessageNext Message »
From:Remi Collet Date:February 3 2009 4:59pm
Subject:Building mysql++ with gcc 4.4.0
View as plain text  
Hi,

New GCC version, new issues ;)

>   C++ <string> (<bits/char_traits.h>) no longer includes <cstdio>.
>   So does <ios>, <streambuf>, <iomanip>, <locale>.
>   When you need anything from C stdio.h, such as EOF, *printf*,
>   *scanf*, remove etc., add #include <cstdio> to all sources that
>   need it.

resetdb.cpp use snprintf
transaction.cpp use getchar

see attached patch proposal.

I also encountered a link error which seems to be related to build
options (when -march=i386 used). I'm investigating on this.

Regards.

P.S. :
https://www.redhat.com/archives/fedora-devel-list/2009-February/msg00193.html

diff -up ./examples/resetdb.cpp.gcc44 ./examples/resetdb.cpp
--- ./examples/resetdb.cpp.gcc44	2008-11-27 09:22:56.000000000 +0100
+++ ./examples/resetdb.cpp	2009-02-03 17:09:24.000000000 +0100
@@ -33,6 +33,7 @@
 #include <mysql++.h>
 
 #include <iostream>
+#include <cstdio>
 
 using namespace std;
 
diff -up ./examples/transaction.cpp.gcc44 ./examples/transaction.cpp
--- ./examples/transaction.cpp.gcc44	2009-02-03 17:15:00.000000000 +0100
+++ ./examples/transaction.cpp	2009-02-03 17:15:14.000000000 +0100
@@ -30,6 +30,7 @@
 #include "stock.h"
 
 #include <iostream>
+#include <cstdio>
 
 using namespace std;
 

Thread
Building mysql++ with gcc 4.4.0Remi Collet3 Feb
  • Re: Building mysql++ with gcc 4.4.0Warren Young3 Feb