"C" in ASM project

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

Hello,

my asm project works fine.

When I add C source file to this project I got

Link error 1822 : undefined _LDEC, undefined _POP32

Could you advice?

My environment: CodeWarrior 3.1 (for HC08, build 4210) + 9S08GB60

 

Thanks,

Shtz

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

Hello

_LDEC is a runtime function implemented in the ansi library used to decrement a long (32 bit) variable.

In order to  be able to link your application you have to add the appropriate ansi library file to your application.

Please refer to {Install}\lib\hc08c\readme.txt to determine which library file to use. This mainly depends on the options you are using to build the application.

Note that when you are programming in ANSI C you may also need a specific startup code.
I would recommend you to go the following way:

  - Create a project indicating you want to use ANSI C and assembly language using the wizard.
  - Remove the main.c and main.asm file added by the wizard and replace them by your actual source files.

This should allow you to be up and running quickly.

I hope this helps.

CrasyCat

元の投稿で解決策を見る

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

Hello

_LDEC is a runtime function implemented in the ansi library used to decrement a long (32 bit) variable.

In order to  be able to link your application you have to add the appropriate ansi library file to your application.

Please refer to {Install}\lib\hc08c\readme.txt to determine which library file to use. This mainly depends on the options you are using to build the application.

Note that when you are programming in ANSI C you may also need a specific startup code.
I would recommend you to go the following way:

  - Create a project indicating you want to use ANSI C and assembly language using the wizard.
  - Remove the main.c and main.asm file added by the wizard and replace them by your actual source files.

This should allow you to be up and running quickly.

I hope this helps.

CrasyCat

0 件の賞賛
返信