Use +z or +Z to recompile...

Andrea Bocci fwyzard@inwind.it
Wed Oct 23 03:45:00 GMT 2002


At 17.52 21/10/2002 -0700, Nagu wrote:

>Hi all,
>I have this problem of linking error using gcc, I have 4 simple files
>first.c (where main function is defined), and myfunc1, myfunc2 and
>incl.h (which defines another function called basefunc). When I compile,
>I get fatal error saying that multiply defined "basefunc". How to get
>rid of this?
>Thanks
>Best
>nagu

put

#ifndef INCL_H
#define INCL_H

at the top of incl.h

and

#endif // ifndef INCL_H

ad the end




More information about the Gcc-help mailing list