I have some problem trying to organize C and header file for my project.
I use mbed LPC11U24, and mbed library is updated to latest version.
In the top right corner i selected mbed LPC11U24 platform.
In my project for example i have 3 files and i want to turn on and off LEDs :
1. main.cpp
2. header_extern.c
3. header_extern.h
1. main.cpp file contains code:
2. header_extern.c file contains code:
3. header_extern.h file contains functions prototype:
The main problem is when i use separated c and header files and try to compile it a got lots of errors. If i try to organize all code in one file (main.cpp) everything work perfect. Why this happend? Why i can't call functions which are defined in header_extern.c from file main.cpp? Should i use same older mbed library and which one?
this picture show compile errors:
I have some problem trying to organize C and header file for my project. I use mbed LPC11U24, and mbed library is updated to latest version. In the top right corner i selected mbed LPC11U24 platform.
In my project for example i have 3 files and i want to turn on and off LEDs :
1. main.cpp 2. header_extern.c 3. header_extern.h
1. main.cpp file contains code:
2. header_extern.c file contains code:
3. header_extern.h file contains functions prototype:
The main problem is when i use separated c and header files and try to compile it a got lots of errors. If i try to organize all code in one file (main.cpp) everything work perfect. Why this happend? Why i can't call functions which are defined in header_extern.c from file main.cpp? Should i use same older mbed library and which one?
this picture show compile errors: