* main in namespace
@ 2008-08-14 12:25 Hilfe
2008-08-14 14:24 ` Eljay Love-Jensen
0 siblings, 1 reply; 2+ messages in thread
From: Hilfe @ 2008-08-14 12:25 UTC (permalink / raw)
To: gcc-help
Hi,
I use a gcc 2.95.3 and if i but the main function in a namespace the
compiler doesn't found the it.
Is there fix for this problem?
Marco
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: main in namespace
2008-08-14 12:25 main in namespace Hilfe
@ 2008-08-14 14:24 ` Eljay Love-Jensen
0 siblings, 0 replies; 2+ messages in thread
From: Eljay Love-Jensen @ 2008-08-14 14:24 UTC (permalink / raw)
To: Hilfe, GCC-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-14 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-14 12:25 main in namespace Hilfe
2008-08-14 14:24 ` Eljay Love-Jensen
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).