Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Jim Donelson Newsgroups: scea.yaroze.programming.codewarrior,scee.yaroze.programming.codewarrior Subject: Re: How to make a 'library' Date: Sun, 01 Mar 1998 16:37:28 -0500 Organization: SCEA News Server Lines: 42 Message-ID: <34F9D518.22DF55F8@jim-donelson.com> References: <6da1hk$g2d13@chuka.playstation.co.uk> NNTP-Posting-Host: 209.4.38.207 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.02 [en] (Win95; I) Xref: chuka.playstation.co.uk scea.yaroze.programming.codewarrior:283 scee.yaroze.programming.codewarrior:176 Well, I don't claim to be a CW expert, but I just created a lib from the survival project libs, and this is what I did: Create a new project, picking NY C as the template. (I assume this creates a project base that has all the right stuff set for NY) Under the files, add the c files using Project/Add files that make up the lib Under the target settings tab, pick Target /MIPS Project/ set project type to Library Set the file name to xxxxx.lib However, I'm not entirely sure how you set the start address. I don't think this should matter, as when the lib is linked into a project, that project should set the start address and the lib routine will be placed in the executable by the linker (that is speculation - I donut have my NY here so I can't confirm that it worked - I was however ever able to build survival after deleting all the libxxx.c file an adding the lib I built as above). Note that I couldn't find and specific mention of this procedure in the docs (doesn't mean it's not there, just means I couldn't find it!). Also, if I was cleaver, I think you could have added this as a sub-project, but if your bothering to create a lib, you probably want a separate project, as the purpose of a lib is to reuse the code. Jim Donelson (jimd@jim-donelson.com) Steve Dunn wrote: > Can someone point me in the right > direction on how to correctly make a > 'library' file using codewarrior. I > can't seem to find any documentation on > it. I'm assuming theres no difference > between a C and C++ library (as far as > implementing it). > > Cheers > > Steve