0
0

Hi,

I have been away from FMOD for a couple of years while I have been working on another commercial project (in VB6.. eew)

I have been learning how to use Visual Studio .NET 2005, and the whole managed scene. I am working on a Video Slot Machine (based on australian slots) as my familiarisation excercise, using Managed C++, Managed Direct3D for rendering, and I am now trying to learn FmodEx.

The 1st issue I am having is that when I include the C++ header (fmod.hpp) and use the FMOD namespace, I get an ambiguation error between the managed "System" namespace, and the "System" class in the "FMOD" namespace. I kludged around this by renaming the "System" class in fmod to "Sys".

The 2nd issue which is the one that I am stuck on is when I compile my FMOD test project I get the following errors.

[size=75:2fohv981]1>fmodtest.obj : warning LNK4248: unresolved typeref token (01000032) for ‘FMOD_SYSTEM’; image may not run
1>fmodtest.obj : error LNK2028: unresolved token (0A000042) "public: enum FMOD_RESULT __stdcall FMOD::Sys::createStream(char const *,unsigned int,struct FMOD_CREATESOUNDEXINFO *,class FMOD::Sound * *)" (?createStream@Sys@FMOD@@$$FQAG?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSound@2@@Z) referenced in function "public: void __thiscall Player::MusicPlayer::OpenFile(char *)" (?OpenFile@MusicPlayer@Player@@$$FQAEXPAD@Z)
1>fmodtest.obj : error LNK2028: unresolved token (0A000046) "public: enum FMOD_RESULT __stdcall FMOD::Sys::init(int,unsigned int,void *)" (?init@Sys@FMOD@@$$FQAG?AW4FMOD_RESULT@@HIPAX@Z) referenced in function "public: __thiscall Player::MusicPlayer::MusicPlayer(void)" (??0MusicPlayer@Player@@$$FQAE@XZ)
1>fmodtest.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::Sys::init(int,unsigned int,void *)" (?init@Sys@FMOD@@$$FQAG?AW4FMOD_RESULT@@HIPAX@Z) referenced in function "public: __thiscall Player::MusicPlayer::MusicPlayer(void)" (??0MusicPlayer@Player@@$$FQAE@XZ)
1>fmodtest.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::Sys::createStream(char const *,unsigned int,struct FMOD_CREATESOUNDEXINFO *,class FMOD::Sound * *)" (?createStream@Sys@FMOD@@$$FQAG?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSound@2@@Z) referenced in function "public: void __thiscall Player::MusicPlayer::OpenFile(char *)" (?OpenFile@MusicPlayer@Player@@$$FQAEXPAD@Z)[/size:2fohv981]

This puzzles me as I am linking in fmodex_vc.lib and gives no errors about the lib.

Does anyone else have experience using FmodEx in Managed C++ and knows what I may be doing wrong?

Robert Heffernan

  • You must to post comments
0
0

You can’t rename an imported token. Try importing it into a namespace, and explicitly resolving the name with the namespace, like:

FMod::System* system;

  • You must to post comments
0
0

That’s correct, just ‘System’ isnt actually a legal class name without the namespace specified somewhere, so even in normal C++ we have to specify FMOD::System *system; The examples should look like that.

  • You must to post comments
0
0

Aah, I got the idea. Thanks guys, i’ll try it out once I get back into .NET (playing with FMODEx in native C++ at the moment)

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.