Hi ! I am using latest FMOD with Dev-Cpp and CodeBlocks Nightly builds. The object file gets created in both but then during linking
following error pops up,

[Linker error] undefined reference to `_ZNFMOD6System4initEijPv@16′
ld returned 1 exit status

Also , FMOD compiles and links perfectly when i use it in VisualC++ 6.0,
(its easy because VC project files are included). However , I dont want
to use FMOD with a 10 year old compiler , and want to use FMOD with
CodeBlocks which has a nice QT support too.

Any hints what should i add to project options …..

Thanks !

  • You must to post comments

or just use visual studio 2005 express eidtion 😉

  • You must to post comments

OK , I understand the Functions are just a little bit different (C interface)when i use FMOD with Dev-Cpp,CodeBlocks(MinGW).
Now , Below is a perfectly written program(100 % correct) by me . It gets builded correctly on Dev-Cpp. I placed a MP3 file "song" in the project folder . When I run the project , blank console pops up and "song"
doesnt gets played .


include "fmod.h"

include <stdio.h>

include <conio.h>

include <iostream>

using namespace std;

int main()
FMOD_SYSTEM *system;

result = FMOD_System_Create(&system);

result = FMOD_System_Init(system,100, FMOD_INIT_NORMAL, 0);

FMOD_SOUND *sound;

result = FMOD_System_CreateSound(system,"song", FMOD_DEFAULT, 0, &sound);

FMOD_CHANNEL *channel;

result = FMOD_System_PlaySound(system,FMOD_CHANNEL_FREE, sound, false, &channel);

return 0;

I am fully confident that all is written correctly , why the song doesnt
gets played ??? 😡

  • You must to post comments

if you want to know what’s wrong, put:

if( result != FMOD_OK ) printf("%s\n", FMOD_ErrorString(result));

after each function call… and include fmod_errors.h

  • You must to post comments

It was a simple mistake (ignorance),
I had to include "song.mp3" and not "song" here ,

FMOD_System_CreateSound(system,"song", FMOD_DEFAULT, 0, &sound);

Now , everything plays O.K. ,
Cheers !

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.