After I wrote all the functions, how do I create my own *.lib file?
After I wrote all the functions, how do I create my own *.lib file?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
This is for gcc
Then later, to use it in another programCode:gcc -c lib1.c lib2.c ... ar cr libfoo.a lib1.o lib2.o ...
Code:gcc -o prog prog.c -L/path/to/foo -lfoo
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
is there a way to do this with borland?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
Read the manual and find similar looking commands?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Ok, but I don't understand this line: ar cr libfoo.a lib1.o lib2.o
what is the libfoo.a ?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
ar - the name of the librarian
cr - specifies that the library is to be created
libfoo.a - the name of the library you want to create. In Unix convention, 'lib' and '.a' are assumed, so the only part you get to choose the name of is 'foo'
lib1.o... - the names of all the object files you want to add to the library
Basically, it says
I want to add all these objects to this library
What is foo you ask
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
so in the end i'll have only one file called libfoo.a ?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
The avalanche has already begun, it is too late for the pebbles to vote
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I'll take it as a yes.
Thanks alot.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.