Making LIBS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Making LIBS

4,928 Views
etolocka
Contributor I
Hi!

I´m using CW for HC(S)08 and I´m a little confused about the right procedure to make a LIB file from several ".c" files with functions.

Any advice?

regards,
Ernesto
http://www.desarrollos.tolocka.com.ar
http://www.mundomicro.com.ar
Labels (1)
Tags (1)
0 Kudos
6 Replies

703 Views
lucianon
Contributor I
Spoiler
 

this is my contribution to undestand how to make libs on CW6.

 

lib (it is the project to generate "out.lib")

testelib (it is the project that are using this generated lib "out.lib") 

 

Luciano Nicolau

www.tci.ind.br

 

0 Kudos

703 Views
lucianon
Contributor I

here are attached the projects to understand how to create libs on CW6.3 .

Luciano

0 Kudos

703 Views
CompilerGuru
NXP Employee
NXP Employee
to create a library, switch the Linker in the "Target Settings" page from "Linker for HC08" to "Libmaker for HC08". Then a new Libmaker for HC08 page shows up where you can specify the library name.
0 Kudos

703 Views
etolocka
Contributor I
Thank you!

Do I need to remove all libs and headers from the LIB folder in the Project Manager? (e.g. ansi.lib)

Regards,
Ernesto.
0 Kudos

703 Views
CompilerGuru
NXP Employee
NXP Employee
You probably only should have your own C files in your project to create the library, well it depends on what the library is for.
For a general purpose lib, I would not put the ansi*.lib, start*.c, datapage.c inside of it.

PS: What for a library do you create anyway?
0 Kudos

703 Views
etolocka
Contributor I
I want to create a library with general functions for several text LCDs.

Another question: What about the header file? Do I need to include it in one of the ".c" files? (e.g. the first one) using the "include" directive?

Regards,
Ernesto.
0 Kudos