Show whole topic Nov 28, 2008 5:28 am
shaktazuki Offline
Mitglied
Registered since: Apr 30, 2008
Location: -


Subject: Re: problems integrating
New problem.

I added MVEPlayer.h and MVEPlayer.c to the project. I copied them to the maxr project directory, where all the other source is. I #included "MVEPlayer.h" in main.cpp. I call MVEPlayer(const char *) from main(). When I compile, I notice that MVEPlayer.c is NOT compiled, and the linker gives me an "unresolved external" error - the unresolved external being MVEPlayer(char const *).

I have tried the same procedure of adding MVEPlayer to a trash project, and it works properly. What's going on with MAXR in VC++ that it acts like the function definition is not there?

Edit: finally found a source.

extern "C"
{
#include "MVEPlayer.h"
}

fixes the problem.
This post has been edited 2 times. Last edit on Nov 28, 2008 5:34 am by shaktazuki.