Author Topic: Beginner: 1st Time use of Bass with VC++  (Read 2704 times)

lizardking

  • Guest
Beginner: 1st Time use of Bass with VC++
« on: 27 Jun '03 - 13:10 »
Hi,

i just started to use BASS for my project.
I use C++ with Visual Studio.NET

So I added the bass.lib, bass.dll and bass.h into the project directory , and after I included bass.h into the source-files and added bass.lib to the linkerdirective no errors are detected.

But now, when BASS_Init will be called, it core dumps, no matter which parameters are given to BASS_init. I tried -1 for default and -2 for the sound device and for the hWnd I tried the actual windowhandle and 0. But i crashes every time.

Anyone how can help me?
Should I add BASS dynamically with GetProcAdress and so?

(: JOBnik! :)

  • Posts: 1080
Re: Beginner: 1st Time use of Bass with VC++
« Reply #1 on: 27 Jun '03 - 14:02 »
Hi ;D

I've tested BASS with Visual Studio.NET 2003 C/C++ and it works perfectly :)

Try one of the C/C++ examples that are in BASS package and see what .LIB Imports you should have, and besides that add BASS.H and example's .C/.RC to your project :)

* I don't think you should add BASS.DLL to your project, just BASS.LIB and BASS.DLL add to /Release or /Debug directories :)

Have fun!

8) JOBnik! 8)

vertex

  • Posts: 38
Re: Beginner: 1st Time use of Bass with VC++
« Reply #2 on: 29 Jun '03 - 19:51 »
hi,

try using in the main header of your file following code.
remove all lib and dll links from the projekt-properties.

#include "bass.h"
#pragma comment (lib, "bass.lib");

thats all.
now in your source code use the functions like you find in the demo-files.
BASS_Init(-1, 44100, 0, hWin /*maybe 0*/)
BASS_Start();

should work now...