What I would do personally (if you are on windows) is use Visual Studio instead of GCC with a make file since Visual Studio lets you compile C and C++ files together or port all C++ code to C. But the most reliable way you could potentially get this to work is to use a regular C++ class.