0
0

Hi !
I’m newb to programing with Fmod.
I’m using VS 2005 and C++.
I did downloaded latest FMOD and did install it and put lib’s and include’s into my VS folders.

This is my code

[code:2j06aazd]

include <iostream>

include <fmod.hpp>

include <fmod_output.h>

using namespace std;
char a;

int main () {

pragma comment(lib,"fmodexL_vc.lib")

FSOUND_STREAM  * stream = NULL;
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);
stream = FSOUND_Stream_Open(&quot;fall.ogg&quot;  ,  FSOUND_LOOP_NORMAL        , 0,0);
FSOUND_Stream_Play(FSOUND_FREE, stream );

cout &lt;&lt; &quot;Press any key to exit &quot; &lt;&lt; endl;
cin &gt;&gt; a
    FSOUND_Stream_Stop(stream);
    FSOUND_Close();

    return 0;

}
[/code:2j06aazd]

My VS 2005 is getting me numerous "Undeclared identifier" and "Identifier not found " errors.

Can someone help me?
Thanks.

  • You must to post comments
0
0

Did you download Fmod or FmodEx… because they are two different APIs and your API usage doesn’t look correct for FmodEx

  • You must to post comments
0
0

Fmodex

  • You must to post comments
0
0

Now i did downloaded FMOD3 and tryed to use the simple – load and play sound but i get these errors :
[code:2429bfqs]
mod.obj : error LNK2019: unresolved external symbol _FMUSIC_LoadSong@4 referenced in function _main
fmod.obj : error LNK2019: unresolved external symbol _FSOUND_Init@12 referenced in function _main
[/code:2429bfqs]

and this is my code :
[code:2429bfqs]

include <iostream>

include <fmod.h>

using namespace std;
char a;

int main () {
FSOUND_Init(44100, 32, 0);
FMUSIC_MODULE *mu = NULL;

mu = FMUSIC_LoadSong("canyon.mid");
FMUSIC_PlaySong(mu);

cout << "Press any key to exit" << endl;
cin >> a;
return 0;

}
[/code:2429bfqs]

thank you.

  • You must to post comments
0
0

are you actually linking it into your project. Just make sure in your linker settings the correct library is linked. Just having it in a folder doesnt make it link.

Your first post was using fmod3 commands with fmod ex. That wouldnt even compile. Just look at an existing fmod example.

  • You must to post comments
0
0

Actually I dont know how to link that lib in VS2005, I know how to link it in DEVC++ but not in VS2005.
Will try to find it on net though.

  • You must to post comments
0
0

Pronlem solved, thanks & lock.

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.