View Single Post
  #4 (permalink)  
Old October 21st, 2004, 07:55 AM
jkeen jkeen is offline
Registered User
 
Join Date: Sep 2004
Location: Brooklyn, NY, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Harrism: Yes, after posting, I eventually concluded that this was simply a difference in the way the libraries are set up/accessed on Linux and Darwin. As I continued to work through the book, I realized that many of the C programs needed to be compiled in a manner like this:

    gcc -o sqrt -I/usr/lib/include sqrt.c -lm

Now, I may have some typos in the above line, because I'm at my day job where I don't have access to Linux, so I'm typing this from memory. But the general idea is correct: After the name of the compiled program, you type a path to the library to be included prefixed by the -I option. Then after the name of the source code file you include the library needed prefixed by the -l (lower case 'l') flag.

When I get to my Linux box I'll try to double-check the typing.

jimk


Just Another Perl Hacker