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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

744 Views
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 Replies

637 Views
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

637 Views
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