Because CANopen layer is coded with C, put a compilation option /TC or /TP if you plan to mix C++ files. See the MSDN documentation about that.