SFML community forums

Help => Audio => Topic started by: asphyxiac on November 14, 2009, 11:05:46 am

Title: SFML2.0 app won't start if any sound classes are used
Post by: asphyxiac on November 14, 2009, 11:05:46 am
Hi, I've been working with SFML2.0 branch, but I can't get the sound to work.

Everything works fine until I decide to use any sound class, as soon as I add sf::sound etc, my app won't launch. "Run with Debugging" in VS starts the app, I can see all the dlls loading up in the output window but it never hits the first line of main(). It doesn't crash, it just doesn't do anything either.

I suspect it's something to do with loading the dlls, but I'm not sure how all this works.

It works fine on 1.5, and the sample app 'sound' has exactly the same behaviour - it won't start.

Any ideas?

Cheers.
Title: SFML2.0 app won't start if any sound classes are used
Post by: Laurent on November 14, 2009, 12:44:48 pm
Have you tried to use the static SFML libraries?
Title: SFML2.0 app won't start if any sound classes are used
Post by: asphyxiac on November 17, 2009, 03:39:36 am
Yes, static libs work. But I'd much rather use the dlls...
Title: SFML2.0 app won't start if any sound classes are used
Post by: asphyxiac on November 17, 2009, 04:47:24 am
Static libs work for "sound" sample project, but not mine. But if I add "/NODEFAULTLIB:LIBCMT" to linker command line then my project will compile against static libs, but still not the dynamic ones.
Title: SFML2.0 app won't start if any sound classes are used
Post by: Laurent on November 17, 2009, 07:42:16 am
Ok, I see what the problem is. Actually, almost all the audio issues have the same source :)
Title: SFML2.0 app won't start if any sound classes are used
Post by: panithadrum on November 17, 2009, 09:59:24 am
Dynamic libs for SFML2 doesn't work?

And... my compiler tells me to put "/NODEFAULTLIB:LIBCMT" too.
What happen if I write that? I don't see anything at all.
Title: SFML2.0 app won't start if any sound classes are used
Post by: asphyxiac on November 18, 2009, 01:23:34 am
Laurent, Is there a workaround I can use until it gets fixed?
Cheers!
Title: SFML2.0 app won't start if any sound classes are used
Post by: Laurent on November 18, 2009, 08:05:30 am
I think that using static libs should work.