AnsweredAssumed Answered

Mixing C and C++ code in CCES

Question asked by YousraA on May 28, 2013
Latest reply on Jun 10, 2013 by CraigG


I'm working with Dr.Smith from the University of Calgary over the summer to start using the code he has developed on VisualDSP++ on CCES.

In his class, Dr.Smith is trying to demonstrate to students the linkage between C, C++ and assembly code. Therefore, I created a simple project to show how we can mix C and C++ code. Calling  a C function from C++ using extern "C" was not a problem since everything compiled fine. However, when I tried calling a C++ fucntion from C, I got a link error (Error li1021). I tried using extern "C++" in the C file but that did not help in solving the problem. I attached the project to this question. I was wondering if you can help me understand how C++ fucntions can be successfully called from C in CCES.