Page 1 of 1

FMOD Integration to CGAPIAPPLICATION

PostPosted: Aug 2, 2002 @ 1:02pm
by jomarco
hi,

I am getting a linking problem :

Linking...
myproject.obj : error LNK2019: unresolved external symbol FSOUND_Init referenced in function "public: __cdecl CMyApplication::CMyApplication(struct _GDAPPCONFIG const &)" (??0CMyApplication@@QAA@ABU_GDAPPCONFIG@@@Z)
ARMRel/MyProject.exe : fatal error LNK1120: 1 unresolved externals

What I have done is the following:

I have created a class called SOUND:

<snip snip>
sound.h :

#ifndef __SOUND_H__
#define __SOUND_H__
#include "fmod.h"
typedef class SOUND {
public:
FMUSIC_MODULE *mod;
SOUND() {
mod = NULL;
FSOUND_Init(12000, 32, FSOUND_INIT_GLOBALFOCUS);
};
....
} SOUND;


<snip snip>

In the main CGAPIApp:

<snip snip>
..
#include "sound.h"

class CMyApplication : public CGapiApplication
{

public:
SOUND sound;
CMyApplication(const GDAPPCONFIG& config) : CGapiApplication(config) {
sound = SOUND();
}

...
}

It compiles fine... but complains when linking...

The fmod library is definitely in the right place...

Can somebody help?

/jomarco

PostPosted: Aug 2, 2002 @ 5:41pm
by BurningSheep

RE:

PostPosted: Aug 2, 2002 @ 7:51pm
by jomarco
Hi,
Thanks for the help.
I have stripped down your api and it compiles, but I am getting the same linker problems.

I have used

extern "C"
{
#include "fmod.h"
#include "fmod_errors.h"
}

so that the C++ understands the C code.

Still not working. I have recreated a whole new eVC project to make sure that I havent done anything stupid. ie.
1. fmodvc.lib is definitely set up in the project settings link
2. Additional library path is definitely set up to point to where fmodvc.lib lives

I now get the following:

<snip snip>

Linking...
Sound.obj : error LNK2019: unresolved external symbol FSOUND_Init referenced in function "public: __cdecl Sound::Sound(void)" (??0Sound@@QAA@XZ)
Sound.obj : error LNK2019: unresolved external symbol FSOUND_GetVersion referenced in function "public: __cdecl Sound::Sound(void)" (??0Sound@@QAA@XZ)
Sound.obj : error LNK2019: unresolved external symbol FSOUND_Close referenced in function "public: virtual __cdecl Sound::~Sound(void)" (??1Sound@@UAA@XZ)
Sound.obj : error LNK2019: unresolved external symbol FMUSIC_FreeSong referenced in function "public: virtual __cdecl Sound::~Sound(void)" (??1Sound@@UAA@XZ)
Sound.obj : error LNK2019: unresolved external symbol FMUSIC_LoadSong referenced in function "public: bool __cdecl Sound::LoadMod(char *)" (?LoadMod@Sound@@QAA_NPAD@Z)
Sound.obj : error LNK2019: unresolved external symbol FMUSIC_PlaySong referenced in function "public: void __cdecl Sound::PlayMod(void)" (?PlayMod@Sound@@QAAXXZ)
Sound.obj : error LNK2019: unresolved external symbol FMUSIC_StopSong referenced in function "public: void __cdecl Sound::StopMod(void)" (?StopMod@Sound@@QAAXXZ)
ARMRel/HighNoon.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

<snip snip>

Is there something that I am missing here? I must be doing something wrong.... But I have really run out of ideas...


Please help...

thanks
Jomarco

PostPosted: Aug 2, 2002 @ 8:07pm
by BurningSheep
If your building for PPC (arm, mips or sh3) you need the lib specifically for these processors. I get the idea you are trying to use the wrong lib (the visual studio desktop version). You can download FMOD CE 3.51 here: http://www.fmod.org/ifmoddownload.html

PostPosted: Aug 2, 2002 @ 8:23pm
by jomarco
yes, you were right!
thank you thnak you thnak you!!!!

Jomarco