Bass lib does not bind, everyone else works fine

I got a strange problem. I am developing a good game with openGL on MFC. I need to use streams for multichannel sound. so I am trying to use BASS lib for this.

For some reason that goes beyond my compromise, I cannot bundle bass.lib. all other libraries (openGL libs, etc.) are perfect.

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

  • I use the global function for the stream declared in the cpp file:

    UINT SetMusicThread (parameter LPVOID);

  • Calling a new thread in "onInitDialog ()":

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

  • Now the function is simply trying to start the first thread: just try installing it step by step:

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

    // Create a pen for music str = BASS_StreamCreateFile (FALSE, sound [SoundPosition], 0,0,0); // Check to see if (str!) {// Invalid, Free object // FreeMusicThread (); return FALSE; }}

  • str is the global HSTEAM.

  • The program compiles normally, but does not communicate with messege:

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

  • bass.lib " Addisionals" , SDK... , ....

- ... ???

10x

+3
1

, bass.h .

lib , sdk ( ): Project → Settings, Link, Object/Library . Lib. ( VS 5.0, SDK)

+1

Source: https://habr.com/ru/post/1754991/


All Articles