This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is there a way to build a program without stdlib linked to it?


William Tambe <tambewilliam@gmail.com> writes:

> When I build a program ommiting:
> #include <stdio.h> or
> #include <stdlib.h>
>
> I get message such as:
> implicit declaration of built-in function 'printf' or 'malloc'
>
> Is there a way to build my program in a way that an error such as
> symbol not found is generated instead of gcc linking agains stdlib?

See the -nostdlib and -nodefaultlibs options.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]