From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30943 invoked by alias); 14 Aug 2008 12:25:38 -0000 Received: (qmail 30929 invoked by uid 22791); 14 Aug 2008 12:25:37 -0000 X-Spam-Check-By: sourceware.org Received: from exprod6og113.obsmtp.com (HELO exprod6og113.obsmtp.com) (64.18.1.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 14 Aug 2008 12:24:49 +0000 Received: from source ([192.150.8.22]) by exprod6ob113.postini.com ([64.18.5.12]) with SMTP; Thu, 14 Aug 2008 05:24:45 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id m7ECOhE0028489; Thu, 14 Aug 2008 05:24:43 -0700 (PDT) Received: from apacmail.pac.adobe.com (apacmail.pac.adobe.com [130.248.36.99]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id m7ECOaiq004530; Thu, 14 Aug 2008 05:24:37 -0700 (PDT) Received: from namailgen.corp.adobe.com ([10.8.192.91]) by apacmail.pac.adobe.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 21:24:35 +0900 Received: from 10.7.234.24 ([10.7.234.24]) by namailgen.corp.adobe.com ([10.8.192.91]) via Exchange Front-End Server namail.corp.adobe.com ([10.8.189.97]) with Microsoft Exchange Server HTTP-DAV ; Thu, 14 Aug 2008 12:24:34 +0000 User-Agent: Microsoft-Entourage/12.12.0.080729 Date: Thu, 14 Aug 2008 14:24:00 -0000 Subject: Re: main in namespace From: Eljay Love-Jensen To: Hilfe , GCC-help Message-ID: In-Reply-To: <966eea5f0808140520t7a80951clb8cfb13fec3c018b@mail.gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00143.txt.bz2 Hi Hilfe, > I use a gcc 2.95.3 and if i but the main function in a namespace the > compiler doesn't found the it. The main-in-a-namespace is not the global main() that the compiler is looking for. You could try to declare your main-in-a-namespace as: extern "C" int main(); > Is there fix for this problem? Yes. Don't put main in a namespace. HTH, --Eljay