"C" in ASM project

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

"C" in ASM project

跳至解决方案
1,564 次查看
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 解答
377 次查看
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 回复
378 次查看
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 项奖励