0
0

hey im new to fmod and i was following the tutorial but anyway this is what i have, but i get errors, and i think there linker errors. Sorry for the bad grammar im kind of in a rush

[code:1fzj6h3r]

include <fmod.hpp>

using namespace FMOD;

System *system;
System_Create(&system);
Sound *sound;
Channel *channel;

int main(void)
{
system->init(100,FMOD_INIT_NORMAL,0);
system->createStream(("thisway.mp3",FMOD_DEFAULT,0,&sound);
system->playSound(FMOD_CHANNEL_FREE,sound,false,&channel);
system::update();
system::release();
}
[/code:1fzj6h3r]

//errors

[code:1fzj6h3r]
Project : Console application
Compiler : GNU GCC Compiler (called directly)

Directory : C:\Documents and Settings\Money\Desktop\

Switching to target: default
Compiling: main.cpp
main.cpp:7: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp:7: error: expected ,' or;’ before ‘(’ token
main.cpp: In function int main()':
main.cpp:15: error: expected
)’ before ‘;’ token
main.cpp:17: error: system' is not a class or namespace
main.cpp:17: error:
update’ undeclared (first use this function)
main.cpp:17: error: (Each undeclared identifier is reported only once for each function it appears in.)
main.cpp:18: error: system' is not a class or namespace
main.cpp:18: error:
release’ undeclared (first use this function)
Process terminated with status 1 (0 minutes, 0 seconds)
[/code:1fzj6h3r]

i have -llibfmodex and -lfmod in the linker, bu ti guess that didn’t work

  • You must to post comments
0
0
  1. this is fmod 3 forum not fmod ex
  2. you are calling System_Create(&system) outside of void main for some reason
  3. you are calling playsound but exiting the application straight away, are you going to let it play? You need a keypress wait or delay of some type.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.