how to reduce the library file size

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to reduce the library file size

ソリューションへジャンプ
1,929件の閲覧回数
u2bpavankumar
Contributor I

Hi all,

 

I am using code warriors to build ARM object library. The code is getting compiled successfully and the static library (.a extension) is generated. But the size of the generated library is coming close to 900KB. When the same code is compiled using GNU tool chain on linux the library file size is coming close to 100 KB. Please let me know if there are any compiler options by using which the generated library file size can be reduced.

 

Thanks in advance

 

Regards,

Pavan

0 件の賞賛
返信
1 解決策
1,758件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

Could it be that the CW built lib contains debug info and the linux built one does not?

 

Anyhow, the file size of a static library does not tipically matter at all, at least in the usual case when the library is only used on the host for cross compilation.

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,759件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

Could it be that the CW built lib contains debug info and the linux built one does not?

 

Anyhow, the file size of a static library does not tipically matter at all, at least in the usual case when the library is only used on the host for cross compilation.

 

 

0 件の賞賛
返信
1,758件の閲覧回数
J2MEJediMaster
Specialist I

In the build settings for the project, check the settings for the linker input. Is the Dead-strip Unused Code option checked?

 

Also, you may want to disable the generation of debug information, which can add the the file size. You would do that only after you have the code debugged, of course.

 

---Tom

0 件の賞賛
返信