Create a new .c .h file and write a custom function, but compile errors when other .c files are called.

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

Create a new .c .h file and write a custom function, but compile errors when other .c files are called.

1,114 次查看
quanjunzhang
Contributor III

I just created the app_led.c and app_led.h files and define a function under the new folder, then called the function in app_main.c. This will cause a compilation error.

 

BUT, if I define the same function under the existing folder (app_end_device_node.c), then called the function in app_main.c. This will be no error.

 

Is this because the .c.h file I created requires additional system configuration?

Please give me some accurate advice, I have spent too much time to solve this problem, thank you very much.

2 回复数

1,007 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Zhang,

You have to modify the makefile

#APPSRC += app_exceptions.c
APPSRC += app_start.c
APPSRC += app_end_device_node.c
APPSRC += app_zcl_task.c
APPSRC += app_buttons.c
APPSRC += app_led.c

Regards,

Mario

1,007 次查看
quanjunzhang
Contributor III

Hi Mario,

it's OK now. 

Thank you very much for taking the precious time to help me solve the problem.

Regards,

Zhang