Re: libraries
Re: libraries
- Subject: Re: libraries
- From: Philip George <email@hidden>
- Date: Mon, 21 Jul 2003 04:53:02 -0500
>
this is ok, but it doesn't build a lib. This only builds object code.
>
To make it a lib you have to use "ar" to make it an archive and then
>
"ranlib" tool to make toc of the archive created.
>
>
i.e. make static library from 2 files
>
>
gcc2 adder.c -nostdlib -static -object -o adder.o
>
gcc2 multiplier.c -nostdlib -static -object -o multiplier.o
>
ar -r arithmetics.a adder.o multiplier.o
>
ranlib arithmetics.a
>
>
>
-Tomas
Awesome. Thanks so much. Should I prototype each function at the top of
its source file? And is it mandatory to make a header to include in my
obj-c project for all the functions contained in the library?
- Philip
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: libraries (From: Tomas Zahradnicky <email@hidden>) |