Alias definition [Was: Re: how to configure gcc]
On 2010-09-29, David Jardine <david@jardine.de> wrote:
> On Wed, Sep 29, 2010 at 06:46:20PM +0100, abdelkader belahcene wrote:
>> hi,
>> by default I have to add option -lm to the command gcc -lm file.c
>> when I use math functions. Where can I configure gcc to add it to the
>> default gcc, after what I don't need the option -lm , just gcc file.c
>> thanks for help
>>
>
> You could add
>
> alias gcc='gcc -lm ' (note the last space)
What's the significance of the last space?
>
> to /etc/profile
<nitpick>
I would put the alias definition in /etc/bash.bashrc or ~/.bashrc
instead. It's a shell customisation, not an environment modification.
</nitpick>
--
Liam O'Toole
Cork, Ireland
Reply to: