SDL audio code

Pages: 1234
Aug 9, 2013 at 9:18pm
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.
Aug 9, 2013 at 10:10pm
You should also add bass.lib in the linker settings of your project, in your IDE.
Aug 9, 2013 at 10:58pm
closed account (NUj6URfi)
What do I type into the linker? Using dev-c++ 4.9.9.2
Aug 10, 2013 at 1:26pm
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.
Aug 10, 2013 at 2:08pm
closed account (NUj6URfi)
I added -lmingw32 -lBASS to the linker and I get file format not recognized.
Aug 10, 2013 at 3:40pm
You probably need to use Visual Studio for it, seeing you're using Dev-C++ ( == MinGW).
At this point, use OpenAL.
Aug 11, 2013 at 10:55pm
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?
Aug 11, 2013 at 11:09pm
closed account (Dy7SLyTq)
dev-c++ is similar to mingw?
Aug 11, 2013 at 11:57pm
closed account (NUj6URfi)
I believe mingw32 is used in dev-c++.
Aug 12, 2013 at 11:36am
@toad: Visual studio uses .lib libraries. Mingw uses .a libraries. They are completely different and uncompatible.
Aug 12, 2013 at 2:01pm
closed account (N36fSL3A)
No they aren't.

For example SDL_image works with both mingw and visual studio, and it's a .lib file.
Aug 12, 2013 at 4:29pm
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.
Aug 12, 2013 at 8:04pm
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++.
Aug 12, 2013 at 9:29pm
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.
Aug 13, 2013 at 12:19am
closed account (N36fSL3A)
Nope. It's lib. That's all I saw anyway.
Aug 13, 2013 at 1:06am
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
Aug 13, 2013 at 1:42am
So you downloaded the VC package for use with MinGW and it worked? I'm very surprised it would work.
Aug 14, 2013 at 8:38pm
closed account (NUj6URfi)
What vc package?
Aug 14, 2013 at 9:02pm
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++.
Aug 15, 2013 at 12:26am
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