gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Libs creation

#37036 - lord_kalipsy - Sat Mar 05, 2005 2:21 pm

Hi!

I recently started programming on my GBA, and I was wondering if it was possible to make libs (like .lib file with VC++). There's some function I use often, and compiling them everytime's too long.

For informaiton I'm using devkitARM.

Thanks a lot,

Psy?

Ps : Sorry for my bad english, it's not my mother thong. ^^

#37041 - Mucca - Sat Mar 05, 2005 3:35 pm

Pack the compiled .o files into an archive using ar.exe, naming the archive libmylib.a, then when you compile your bin link the lib by using -L -mylib as a flag to gcc.

For ar you probably want the flags -rvs or -ruvs, but s and v mightnt be neccessary.

If the archive is not named libXXX.a then it cant be linked as a library (without extra fiddling that is).

http://www.gnu.org/software/binutils/manual/html_mono/binutils.html

Im disturbed by the information about your mother's thong. This is a public forum so lets kept it all above the belt, there may be kiddies watching. Why does no one ever think of the children!?!

#37042 - lord_kalipsy - Sat Mar 05, 2005 3:50 pm

Thanks a lots, I'll try it right away. (:

Quote:
Im disturbed by the information about your mother's thong. This is a public forum so lets kept it all above the belt, there may be kiddies watching. Why does no one ever think of the children!?!


Arf, you know what I mean ;)
( French expression are so different -__-'' )

#37053 - sajiimori - Sat Mar 05, 2005 7:44 pm

Heheh... I guess that was "mother tongue"?