views:

17

answers:

1

Hello all,

I'm having a wierd problem. i'm developping a nice game with openGL on MFC. i need to use threads for multi sound. so i am trying to use the BASS lib for that.

For a reason that is beyond my comprihention, i can not get the bass.lib to link. all other libs (openGL libs and so on) link perfect.

  1. i'v added "#include "base.h" to my *.h MFC dialog file (tried both the .cpp and the .h).

  2. I am using a global function for the thread declared in the cpp file:

    UINT SetMusicThread(LPVOID Param);

  3. Calling the new thread in the "onInitDialog()":

    AfxBeginThread(SetMusicThread,GetSafeHwnd(),THREAD_PRIORITY_NORMAL,0,0,NULL);

  4. The function for now is just trying to start the first stream: just trying set by step:

    UINT SetMusicThread(LPVOID Param) { //soundTrack* sound = (soundTrack*)Param;

    // Create Handle to the music str=BASS_StreamCreateFile(FALSE,Sound[SoundPosition],0,0,0); // Check if valid if(!str) { // Not valid, Free object //FreeMusicThread(); return FALSE; } }

  5. str is a global HSTEAM.

  6. The program compiles ok, but doesn't link with the messege:

    Error 6 error LNK2019: unresolved external symbol _BASS_StreamCreateFile@20 referenced in function "unsigned int __cdecl SetMusicThread(void *)" (?SetMusicThread@@YAIPAX@Z) MonstersDlg.obj Monsters

  7. added the bass.lib to the "Addisionals dependencies" and even tried to put it both in my project and in the the LIB of the SDKs library....tried every thing i can think of....

Can any one please help me....what am i missing???

10x

A: 

I think bass.h creates a static library.

You need to add the actual lib to your project by pressing in your sdk (while your project is open): Project -> Settings, press the Link tab and in your Object/library modules add the actual path of tha bass.lib. (the instructions are on VS 5.0 so diferences may be present in newer SDK versions)

Sunscreen
10x, i did that allready, added the bass.lib to the linker, the same thing u do with the opengl files or any external file....mabye i didnt understand you, but if i did, it is one of the steps i did allready....and not working
Erez
You dhould NOT add it as Addisional dependency you should basically add it to your dsp file. You should NOT add the file, yolu should insert the PATH.
Sunscreen
ok, 10x, now i'm confused...LOLI guess that i don't know what u mean....under project there is no setting, just the properties, that leed you to the linker and then the dependency....What is the dsp file? what path to add and where?this is a very new direction, after trying to find a solution all over the web....if you could help me some more i will be very grateful....10x
Erez
p.s. i'm using VS 2008, mabye that is why i can't find it?
Erez