AMD64 and C++ compiling
Colin Watson
cjwatson at ubuntu.com
Tue May 31 18:00:39 CDT 2005
On Tue, May 31, 2005 at 11:44:45PM +0200, Andrea wrote:
> On my Debian x86 laptop with g++-2.95 and libstdc++2.10-dev all seems
> ok, it compiles with no errors, instead on Hoary-AMD64 with g++-3.3.5 or
> g++-4.0 with its own libstdc++ the same code gives me this output:
>
> gcc -Wall -c test.cpp
> In file included from test.cpp:2:
> primitives.h:10: error: syntax error before `::' token
> primitives.h:11: error: syntax error before `::' token
> primitives.h:18: error: 'list' is used as a type, but is not defined as
> a type.
Either put 'using namespace std;' near the top of each .cpp file, or
(better) change 'list' to 'std::list' etc. throughout. libstdc++2.10
wasn't fully standard-compliant. For more details, see:
http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/porting-howto.html
Cheers,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the ubuntu-devel
mailing list