0
0

Hi, i’m having a problem getting this going with my managed classes.

I’ve defined my FMOD objects in the global space in a header file, which is included by two classes, one class is unmanged, which inits all the FMOD objects, and the other class which is managed, which simply calls Channel->setVolume to change the volume of the global sound channels.

However, i get a linker error from the managed class

MenuPreferences.obj : error LNK2028: unresolved token (0A0002B0) "public: enum FMOD_RESULT __thiscall FMOD::Channel::setVolume(float)" (?setVolume@Channel@FMOD@@$$FQAE?AW4FMOD_RESULT@@M@Z) referenced in function "private: void __clrcall MenuPreferences::musicBar_Scroll(class System::Object ^,class System::EventArgs ^)" (?musicBar_Scroll@MenuPreferences@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@3@@Z)
1>MenuPreferences.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setVolume(float)" (?setVolume@Channel@FMOD@@$$FQAE?AW4FMOD_RESULT@@M@Z) referenced in function "private: void __clrcall MenuPreferences::musicBar_Scroll(class System::Object ^,class System::EventArgs ^)" (?musicBar_Scroll@MenuPreferences@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@3@@Z)

The contents of my header file i’m including is:

/****************************************

include "fmod.hpp"

include "fmod_errors.h"

static FMOD::System *SSoundSystem;
static FMOD::Sound *SSoundAddress;
static FMOD::Channel *SBackgroundMusicChannel;
static FMOD::Channel *SSoundEffectChannel;
****************************************/

Any ideas on this? It seems to be something to do with unmanaged vs managed classes. My unmanaged classes is able to call the setVolume members fine.

-FMODEx 4.06.22
-VSC++ 2005 Express
-Have linked fmodex_vc.dll and included relevant paths

Thanks,

  • You must to post comments
0
0

Can you make a small project that demonstrates this? You could zip it and upload it to http://ftp.fmod.org l:upload p:upload if you like. It won’t be an fmod issue but we can suggest what you might be doing wrong by looking at it ourselves. I can’t really suggest anything from this post alone.

  • You must to post comments
0
0

thanks brett, i think you’re right in that it’s not an fmod issue. looking at it further i think i might have a namespace problem, ill try again tomorrow to fix it and if not ill make a small project and upload.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.