View Single Post
  #1   Spotlight this post!  
Unread 01-25-2010, 08:19 PM
nabioullinr nabioullinr is offline
Registered User
FRC #1073
 
Join Date: Jan 2010
Location: Hollis, NH
Posts: 17
nabioullinr has a spectacular aura aboutnabioullinr has a spectacular aura aboutnabioullinr has a spectacular aura about
Cannot Mix C Code

I am trying to integrate C sources into the project (based on SimpleTemplate) but I am unable to call a C function from C++, since at runtime I receive an undefined reference error. I have tried to use both

/*C++ File*/
extern "C" {
#include "cheader.h"
}

and

/*cheader.h*/
extern "C" {
void func();
}

Any ideas? Could it be due to name mangling?

Last edited by nabioullinr : 01-25-2010 at 08:31 PM.
Reply With Quote