Re: libraries
Re: libraries
- Subject: Re: libraries
- From: "Alastair J.Houghton" <email@hidden>
- Date: Mon, 21 Jul 2003 11:00:25 +0100
On Monday, July 21, 2003, at 07:11 am, Tomas Zahradnicky wrote:
gcc adder.c -nostdlib -static -object
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
These should be
gcc adder.c -c -o adder.o
gcc multiplier.c -c -o multiplier.o
You are trying to fight the linker, which is crazy ;-) Just tell GCC
not to link with the "-c" option.
Kind regards,
Alastair.
_______________________________________________
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>) |