Discussion Forum

Creating a custom library

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Joao Martins
Posted
23-Jul-2001 14:56 GMT
Toolset
C51
New! Creating a custom library
Have the following problem:

I need to create a library with many functions.
Some functions will be used by some projects and others by other projects. The important is to have only one library version to manage.
Big problem: I am getting Warning 16: uncalled segment... for the functions not being called! And I think that XDATA is being taken? CODE I think is not being taken by the unused functions?

Does anyone knows a way to avoid this?
Read-Only
Author
Sven Petersen
Posted
24-Jul-2001 14:29 GMT
Toolset
C51
New! RE: Creating a custom library
In case you are not sure, if your linker call does, what you intend to do it, I suggest to read the *.M51 file, which is the linker report. It is pretty informative and definately worth to spend the 5 minutes to understand the linker report :)
Read-Only
Author
Jon Ward
Posted
27-Jul-2001 18:16 GMT
Toolset
C51
New! RE: Creating a custom library
Put one function per C file and rebuild the library.

If you have a C file with lots of functions, the obj file will include ALL of these functions. If you link with this library but you don't call all of the functions in a module (obj file) you will receive the error you mention.

Jon

Next Thread | Thread List | Previous Thread Start a Thread | Settings