Where are __X_IDIVU and __X_IMULU?

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

Where are __X_IDIVU and __X_IMULU?

ソリューションへジャンプ
1,705件の閲覧回数
MicroTang
Contributor III
Hi All,
 
When I build a project, I got two link errors, symbol __X_IDIVU and __X_IMULU are undefined in obj file. It seems a lib file is missed, but could you please tell me which lib file include the symbols? Thanks!
 
ラベル(1)
0 件の賞賛
返信
1 解決策
616件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
First, please mention which CPU you are targeting. I make an educated guess and assume you are targeting a S12X and you are using the XGATE.
The XGATE compiler does prefix its functions with __X_.

In general I would recommend to create a project with the new project wizard and see how the newly generated project it setup, it does include the right libraries for example.

In your case, the XGATE runtime routines are defined in the XGATE libraries,
See
C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\lib\xgatec\readme.txt for a list,
you probably want to use the integer only lib:
C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\lib\xgatec\lib\ansi_xgi.lib

The actual IMULU/IDIVU runtime routines are implemented in
C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\lib\xgatec\src\rtsxgate.cxgate

You can alternatively to the library also add this source file to your project, but then only the runtime routines and not all the ANSI functions are available.

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
617件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
First, please mention which CPU you are targeting. I make an educated guess and assume you are targeting a S12X and you are using the XGATE.
The XGATE compiler does prefix its functions with __X_.

In general I would recommend to create a project with the new project wizard and see how the newly generated project it setup, it does include the right libraries for example.

In your case, the XGATE runtime routines are defined in the XGATE libraries,
See
C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\lib\xgatec\readme.txt for a list,
you probably want to use the integer only lib:
C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\lib\xgatec\lib\ansi_xgi.lib

The actual IMULU/IDIVU runtime routines are implemented in
C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\lib\xgatec\src\rtsxgate.cxgate

You can alternatively to the library also add this source file to your project, but then only the runtime routines and not all the ANSI functions are available.

Daniel

0 件の賞賛
返信
616件の閲覧回数
MicroTang
Contributor III
Thanks!
 
I am using S12XEP100. The link issues have been eliminated after the library file added into project.
 
Thanks!
 
Michael
0 件の賞賛
返信