Re: main in namespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux