This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
extern C and static data type problem with g++
- From: "Luu Vo" <vtluu at tma dot com dot vn>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 27 Apr 2004 16:14:18 +0700
- Subject: extern C and static data type problem with g++
In RH Linux 9, when compiling my C++ program with lines as below:
extern "C" struct {int x};
static enum E{A=0, B, C};
g++ said:
storage class specified for field `x'
`static' can only be specified for objects and functions
Is this just the implementation of g++? That means I can't use static and
extern "C" for those lines of code?
Another question: with GNU g++/gcc compiler and its C++ library, can I use
both traditional C++ lib (e.g., classic iostream) and standard C++ lib
(e.g., standard iostream) in my C++ program. Are the both libraries
implemented in glibstdc++?
Any help will be appreciated.
Luu Vo.