[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] gcc ques
- Subject: [ale] gcc ques
- From: casacruz at bellatlantic.net (John J. Cruz)
- Date: 24 Apr 2002 21:13:05 -0400
Fletch,
Thank your for the information.
jjc
On Tue, 2002-04-23 at 21:47, Fletch wrote:
> >>>>> "John" == John J Cruz <casacruz at bellatlantic.net> writes:
>
>
> [...]
>
> John> echo $PATH includes /usr/X11R6/lib
>
> PATH has to do with executing things, not compilation.
>
> John> I don't understand why gcc insist on looking in directory
> John> /usr/bin when the library in question is in /usr/X11R6/lib?
> John> For that matter how do I change gcc to look somewhere else?
>
> -L/usr/X11R6/lib
>
> man gcc and man ld
>
> John> The header file "includes <math.h> why should I have to add
> John> -lm to link with the math library?
>
> Including the header just provides the C prototypes for the
> functions; it says nothing about linkage. You've got to tell gcc to
> pull in the math library.
>
> And yes, this can be a pain. This is why you write a Makefile
> or use automake and only type things out once.
>
> --
> Fletch | "If you find my answers frightening, __`'/|
> fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
> 770 933-0600 x211(w) | scary questions." -- Jules =(___)=
> 770 294-0820 (m) | U
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
> sent to listmaster at ale dot org.
>
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.