Re: two things..........

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

 



On Wed, 04 Feb 2004 16:14:17 -0500
"Graham Walsh" <graham_walsh50@xxxxxxxxxxx> wrote:

> Hi,
> 
> I have two issues;
> 
> 
> 1) link failure with "atexit" already defined, this is with gcc v3.2 for c++ 
> in conjunction with the latest cygwin installation.
> 
> 

Hi,

does your compiler report some warning like "implicit declaration of atexit()"? Try to import the atexit symbol from the std:: namespace:

#include <cstdlib>
#include <iostream>

using std::atexit;

void foo( void )
{
	std::cout << "Bye bye" << std::endl;
}

int main( int argc, char** argv )
{
	atexit( foo );

	return 0;
} 

This should work in any gcc v3 compiler.

Miguel.

Attachment: pgp00015.pgp
Description: PGP signature


[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