Using LPCXpresso 1114, I am unable to call a function in a C++ file from a C file
The C++ function needs to be declared as extern "C" when compiled by C++, but not when compiled in C (because the C language assumes all functions use C calling convention).

In the header file that declares foo(), use the __cplusplus predefined macro to enclose the opening and closing brace of the extern "C" declaration. 

This header should be #include-ed in both the C and C++ code, but the extern "C" declaration will only be active for the C++ compiler.

// near start of the header file...
#ifdef __cplusplus
extern "C" {
#endif

// declaration of function foo
void foo(void);

// ...at the end of the header file
#ifdef __cplusplus
}; // this brace closes the extern "C" declaration
#endif


When you define the implementation, the function has to be declared extern "C":

// foo.cpp
extern "C" void foo(void)
{
    // implementation of function foo
}


In C++ it's legal to have both int foo(int) and int foo(double) as long as both functions have the same return type. The function names get "name-mangled" to distinguish the different argument lists (for example i32fooi32 and i32fooD80). These mangled names are visible at the linker level, and different C++ compilers use different name-mangling schemes. The key for linking with C is to avoid name-mangling altogether. This is why both the declaration and the definition have to be marked extern "C".