LPC11U24 - problem with header and C file organization?

03 Apr 2014

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:

/media/uploads/elektronika1/main.cpp_file.png

2. header_extern.c file contains code:

/media/uploads/elektronika1/heade.c_file.png

3. header_extern.h file contains functions prototype:

/media/uploads/elektronika1/header.h_files.png

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: /media/uploads/elektronika1/compile_errors.png