unix newbie question

jmmistrot

Registered
I had a general newbie kinda question to ask;


okay if I am gonna be compiling some GL stuff from the command line where should I place my GL libraries?
Would I throw them into usr/local/lib/? or maybe usr/lib/ ? I know where they are for PB but when I compile from commandline of course they are quite invisble to the compiler.. where does the compiler look first I guess is my question and how can I change this? .in the .cshrc?
 
If you have an application/src which depends on libraries you should have a makefile and before that configure your make file.

where to put the libraries is arbitrary

main system libraries are usually in /usr/lib

libraries which you compile and install or get from some package will go into /usr/local/lib

on the other hand some apps might want to put their own libraies in another place.

like /usr/local/mysql/lib

so how do you tell the cc how to compile

1. you run a configuration script which sets up basic system parameters and substitues them into your makefile and any other supporting files.

2. you run cc directly
for example cc -o -c -L -l -I

where the -L is followed by where the libraries you which to include
where -I tell you which .h header files to include.

where -l[name] is a specific library you want to use and it may be found in the system normally

where -o and -c determine the type of out put and the nature and list or location of the source files.

there are tons more. I just tell you a few. to make you think a little

there is extensive documentation installed with the DevTools

there is lot's of help but you have to help your self too.
 
would be....

find something to compile which has well written configure scripts and Makefiles and learn from others.

Many source packages which you can just dload and Make and run. sometimes with a little tweaking. sometimes just make it.



see articles at

http://www.macosxhints.com

http://www.stepwise.com

IDE like powerbuilder and Codewarrior will set the many -options for you, but if you get some idea of what you are doing at the command line your experience of those tools will also be much more productive.
 
Back
Top