PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Mixing C and C++

I have a problem: Descent is now calling some functions from EasyCE.cpp, but Descent itself is pure C. This causes unresolved externals while linking. Can someone explain to me how I can fix this? I tried renaming easyce.cpp to easyce.c, but that causes major problems with the other libraries that I link to easyce. I'm also not familiar with the 'extern "C"' thing, should I use that?

Like I said, I suck at C++. :)
Never mind, it's solved. :) I needed to add 'extern "C"' to both the definition and implementation.
yeah, C sucks big time man. Good thing C++ is around.