This is a C-language problem only.
There are always two files that work together: a header file (.h) which contains only declarations and a .c file that contains the source and all definitions. The .h file is #included in the .c file and additionally wherever you need to call a function from the .c
Have a look at the generated code and understand the mechanic of th #if macro which cares that the .h file is expanded only once.
Thanks for reply bob
But here the problem is even if a make send_packet(); as extern void send_packet(void); still the problem exists.
I executed this send_packet(void); in gcc it's working fine but in the IDE only it causes problem.
The packet.c file is included badly in your project and will not be compiled.
- Right click in workspace explorer on "packet.c"
- choose "Remove from Design01"
- Right click in workspace explorer on Source Files
- choose "Add Existing item"
- Choose in file dialog "packet.c"
- Re-build project
it's working now.