Advertisement

need help (and general info) using FMod/Api's!

Started by July 31, 2002 05:21 AM
3 comments, last by flukus 22 years, 3 months ago
I''m trying to inlcude fmod so i can play midi files in my program I''ve added the following code: #pragma comment(lib, "fmodvc.lib") I don''t have the faintest Idea what this line means but it said to include it in a tutorial I read. FSOUND_Init(44100, 32, 0); //initialize fmod FMUSIC_MODULE *pmypointer = FMUSIC_LoadSong("alliwant.midi"); //load all i want FMUSIC_PlaySong(pmypointer); This is how it said to do it in the api documentation. The problem happens while the program is linking, I get a : InteractiveFictionDlg.obj : error LNK2001: unresolved external symbol _FMUSIC_PlaySong@4 error. The documentation also says to "link fmodvc.lib by putting it into your link section/makefile/project." and I have no idea what this means. I''ve included the fmod.dll and fmod.h files in the programs directory. Anyone know what I''m doing wrong?
include fmodvc.lib file in the programs directory as well. (the same directory where your cpp and h files are)
-----------my quote is under construction
Advertisement
I''ve tried that and I still get the same errors.
so, what that pragma does is to tell your compiler to use this lib.

you can also try doing the same thing by using the vc menu Project->Add To Project->Files.. select your lib file afterwards..

don''t forget to "Rebuild All" (Build menu) after..

by the way, I hope you are including the header file in the cpp where you call your fmod functions (#include "fmod.h")
-----------my quote is under construction
"you can also try doing the same thing by using the vc menu Project->Add To Project->Files.. select your lib file afterwards.."

Ahh, thats what did the trick, thanks heaps!

This topic is closed to new replies.

Advertisement