Lib files and LCF

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,947件の閲覧回数
Kaare
Contributor III

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??

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,509件の閲覧回数
CrasyCat
Specialist III

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

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,509件の閲覧回数
stanish
NXP Employee
NXP Employee

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

0 件の賞賛
返信
1,509件の閲覧回数
Kaare
Contributor III

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):

 

Linker output settings

 

I already tried disabling all the "generate.." options but it still gives this error.

 

0 件の賞賛
返信
1,510件の閲覧回数
CrasyCat
Specialist III

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

0 件の賞賛
返信
1,509件の閲覧回数
Kaare
Contributor III

Thanks CrazyCat, that did it :smileyhappy:

 

After i removed those settings and removed all startup and exception code it compiled fine without the lcf!

0 件の賞賛
返信