SDL audio code

Pages: 1234
closed account (NUj6URfi)
I linker errors. To install bass all I did was include the h file, put the dll in with the executable and put the lib in with my sdl libs. Nothing else.
You should also add bass.lib in the linker settings of your project, in your IDE.
closed account (NUj6URfi)
What do I type into the linker? Using dev-c++ 4.9.9.2
Taken from Lazyfoo's screenshots:

http://lazyfoo.net/SDL_tutorials/lesson01/windows/devcpp/linker.jpg


Just, also add -lBASS in the Linker section.
Not sure if it works with Dev-C++ anyways.
Besides, Dev-C++ is quite old and you should upgrade to something else.
closed account (NUj6URfi)
I added -lmingw32 -lBASS to the linker and I get file format not recognized.
You probably need to use Visual Studio for it, seeing you're using Dev-C++ ( == MinGW).
At this point, use OpenAL.
closed account (NUj6URfi)
Couldn't find anything good for openal like a purchase link. I hate visual studio. How are they different in this case?
closed account (Dy7SLyTq)
dev-c++ is similar to mingw?
closed account (NUj6URfi)
I believe mingw32 is used in dev-c++.
@toad: Visual studio uses .lib libraries. Mingw uses .a libraries. They are completely different and uncompatible.
closed account (N36fSL3A)
No they aren't.

For example SDL_image works with both mingw and visual studio, and it's a .lib file.
Lumpkin wrote:
No they aren't.

For example SDL_image works with both mingw and visual studio, and it's a .lib file.
There is no binary compatibility between gcc/mingw libs and VS libs, so you are wrong.
SDL_image probably works because a XXX.lib and a libXXX.a have been supplied?

By default, the naming conventions want the libraries to be named XXX.lib for VS, and libXXX.a for G++.
closed account (NUj6URfi)
Got audio to be played by playsound through windows.h with -lmingw32 -llibwinmm in my linker. Thanks for everyone's help. :) Guessed what to type into the linker.
closed account (N36fSL3A)
Nope. It's lib. That's all I saw anyway.
closed account (Dy7SLyTq)
i have to agree with fred on this one. i avidly use sdl w/ mingw, and my SDL_Image is a .lib. and i have used it avidly
So you downloaded the VC package for use with MinGW and it worked? I'm very surprised it would work.
closed account (NUj6URfi)
What vc package?
closed account (S6k9GNh0)
That is quite odd. I wasn't aware but perhaps ld is capable of linking against a library compiled against different versions of VC++.
I've almost read "LB".
Anyways it's not a big surprise it's compatible with other VC++ compilers: <just a supposition>Basically cl.exe and ld.exe almost never change, mostly it's just a IDE change. </just a supposition>
I didn't expect MinGW was able to read VC++ libraries instead.
@naraku: Again, I'm not surprised it did work with the VC toolkit, as basically their C++11 support is sucky, just few changes happened (And this probably didn't apply to SDL as it's a C library).
Pages: 1234