This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Is there a way to build a program without stdlib linked to it?
- From: Ian Lance Taylor <iant at google dot com>
- To: William Tambe <tambewilliam at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 13 May 2008 21:09:48 -0700
- Subject: Re: Is there a way to build a program without stdlib linked to it?
- References: <482A5397.30409@gmail.com>
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