0
0

it has probally been asked before but i’m using dev c++ and i can’t get anything to work

here is my code and the ERRORS!! it gives me:

include <fmod.h>

include <stdio.h>

include <stdlib.h>

include <windows.h>

include <conio.h>

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

mod = FMUSIC_LoadSong(“deathsong.mp3”);
FMUSIC_PlaySong(mod);

printf(“Press any key to quit\n”);
printf(“=========================================================================\n”);
printf(“Playing %s…\n”, FMUSIC_GetName(mod));
do
{
printf(“order = %d/%d, row = %d/%d channels playing = %d cpu usage = %.02f%% \r”, FMUSIC_GetOrder(mod), FMUSIC_GetNumOrders(mod), FMUSIC_GetRow(mod), FMUSIC_GetPatternLength(mod, FMUSIC_GetOrder(mod)), FSOUND_GetChannelsPlaying(), FSOUND_GetCPUUsage());
Sleep(10);
} while (!_kbhit());

getch();

printf("\n");

FMUSIC_FreeSong(mod);
FSOUND_Close();

return 0;

}

[Linker error] undefined reference to `FSOUND_Init@12′

[Linker error] undefined reference to `FSOUND_Init@12′

[Linker error] undefined reference to `FSOUND_Init@12′

etc etc for every function it gives me this even though i linked everything like it says in the tutorial

  • You must to post comments
0
0

it is from the company BloodShed. [url:3hb7zej6]http://www.bloodshed.net[/url:3hb7zej6]
I did get the correct libaries i tried all of them and with the libfmod.a it says no linking errors but it can’t find the libary even though it is in the “lib” folder and in the folder where the exe is

  • You must to post comments
0
0

Dev C++ uses MingW as compilter.
Linking with LIBFMOD.A would be correct.
I don’t quite understand your problem, you say you get no linking errors when using libfmod, but on the other hand you can’t find the file ?

  • You must to post comments
0
0

argg i just started C++…. well i haven’t i’ve been doing it for a while and what i want to do is make a game…. now i made the game but then i hit this site and thought ohh yes music but i’ve spend all day trying to figure out how to do it but i just can’t find it. Can anyone help and maybe write me a full code which i can learn from… Yes i did look at the examples which come with the downlaod but they don’t work when i try to compile them!!

  • You must to post comments
0
0

I had trouble when trying to compile FMOD programs with Dev-C++.
Try linking gdi32 to your program. That may solve your problem like it did mine.

  • You must to post comments
0
0

I think I know what the problem is. Try copying fmod.dll into your compiled .exe’s folder… linking with the import library still requires that your program can find the DLL at load-time.

  • You must to post comments
0
0

Dev-C++ also can be set up to use the CygWin compiler.

  • You must to post comments
0
0

Is it just me or does FMOD NOT play MP3 files with FMUSIC_LoadSong?

-cb

  • You must to post comments
0
0

Not sure if you are still having an issue with the:
“[Linker error] undefined reference to `FSOUND_Init@12′ “

I had the same problem and resolved it by adding the libfmod.a into the parameters section of the project.

To do this with your project open:
1- Goto ‘Project’ Menu
2- Select ‘Project Options’
3- Click on the Parameters tab
4- Click on the ‘Add library or object’ button underneath the Linker section
5- Select the libfmod.a (either in your project directory or under the lib folder in Dev C++)
6- Click on Open
7- Click on OK to close the ‘Project Options’
8- Compile your program

Hope this helps… keep up with the coding!

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.