From: Eljay Love-Jensen <eljay@adobe.com>
To: Hilfe <meine.hilfe@googlemail.com>, GCC-help <gcc-help@gcc.gnu.org>
Subject: Re: main in namespace
Date: Thu, 14 Aug 2008 14:24:00 -0000 [thread overview]
Message-ID: <C4C98E26.7D31%eljay@adobe.com> (raw)
In-Reply-To: <966eea5f0808140520t7a80951clb8cfb13fec3c018b@mail.gmail.com>
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
prev parent reply other threads:[~2008-08-14 12:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-14 12:25 Hilfe
2008-08-14 14:24 ` Eljay Love-Jensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C4C98E26.7D31%eljay@adobe.com \
--to=eljay@adobe.com \
--cc=gcc-help@gcc.gnu.org \
--cc=meine.hilfe@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).