From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32443 invoked by alias); 27 Apr 2004 09:16:39 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 32377 invoked from network); 27 Apr 2004 09:16:35 -0000 Received: from unknown (HELO localhost.localdomain) (203.162.42.195) by sources.redhat.com with SMTP; 27 Apr 2004 09:16:35 -0000 Received: from localhost (mail [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.11) with ESMTP id i3RKGAqZ028522 for ; Tue, 27 Apr 2004 16:16:10 -0400 Received: from localhost.localdomain ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01836-53-2 for ; Tue, 27 Apr 2004 16:15:47 -0400 (EDT) Received: from smail.tma.com.vn (smail.tma.com.vn [192.168.1.9]) by localhost.localdomain (8.12.8/8.12.11) with ESMTP id i3RKDcCr028466 for ; Tue, 27 Apr 2004 16:13:38 -0400 Received: from localhost (localhost [127.0.0.1]) by smail.tma.com.vn (8.12.8/8.12.11) with ESMTP id i3R9Fvpl000671 for ; Tue, 27 Apr 2004 16:15:57 +0700 Received: from smail.tma.com.vn ([127.0.0.1]) by localhost (smail.tma.com.vn [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12498-93 for ; Tue, 27 Apr 2004 16:15:55 +0700 (ICT) Received: from LuuVo ([192.168.98.204]) by smail.tma.com.vn (8.12.8/8.12.11) with SMTP id i3R9Fl4e000657 for ; Tue, 27 Apr 2004 16:15:52 +0700 From: "Luu Vo" To: Subject: extern C and static data type problem with g++ Date: Tue, 27 Apr 2004 09:16:00 -0000 Message-ID: <001d01c42c38$0582b7a0$cc62a8c0@LuuVo> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at TMA Solutions new Smail Server X-Virus-Scanned: by amavisd-new at TMA Solutions Mail Servers X-SW-Source: 2004-04/txt/msg00346.txt.bz2 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.