I have a question that i can't really find an answer to anywhere:
If i compile a .lib file and include it in another project, then what about the LCF file?? The project that i compile into the lib file needs the lcf file and so does the project that i include the lib file in.
Now, what i wonder is this: What lcf file is the one used then? Should they be defined equally or does it only use the lcf file from the final project and thus making the lcf file in the lib project irrelevant??
解決済! 解決策の投稿を見る。
Hello
I did some test son my side with CodeWarrior for MCU V10.1 build 110204
After I created a project using the wizard I did following modifications:
- In ColdFire Linker> Input panel I deleted content of Link Command File and Entry Point edit boxes.
- In ColdFire Linker> Output panel I set Output Type to Static Library.
I was then able to build the project and generate the static library.
What did you do differently?
CrasyCat
Hi Kaare,
Actually the project that builds a library does not need a .lcf file. If you have a .lcf file in your project you can remove it since it's ignored.
Library is in fact the set of all data objects and functions in form of the object code.
When you add a library into your application then the library objects/functions referenced in the application are linked into final executable file (.elf).
The exact placement of a library object depends on a declared section (default e.g. .text or custom one e.g. .my_text) and it's controlled by the application .lcf file.
Stanish
Thanks for your reply.
If i remove the project.lcf file i get this error:
"DescriptionResourcePathLocationTypemake: *** No rule to make target `C:/Lokale Dokumenter/Freescale/Workspace/TEOS/Project_Settings/Linker_Files/Project.lcf', needed by `TEOS.lib'.TEOSline 0C/C++ Problem"
Thats why i'm confused about the lcf file.
Here's my project settings (Linker output):
I already tried disabling all the "generate.." options but it still gives this error.
Hello
I did some test son my side with CodeWarrior for MCU V10.1 build 110204
After I created a project using the wizard I did following modifications:
- In ColdFire Linker> Input panel I deleted content of Link Command File and Entry Point edit boxes.
- In ColdFire Linker> Output panel I set Output Type to Static Library.
I was then able to build the project and generate the static library.
What did you do differently?
CrasyCat
Thanks CrazyCat, that did it
After i removed those settings and removed all startup and exception code it compiled fine without the lcf!