SFML community forums
Help => General => Topic started by: Mahorin on September 17, 2023, 02:08:01 am
-
hello I have a problem, I am making a game with sfml and I use MinGW for compilation and VScode as ide, so far so good I can compile with my Makefile and it's great, but when I try to display traces with std::cout for example this is not displayed anywhere and I have tried everything but I cannot link from terminal to the program in order to display my traces, could someone help ?
-
Don't build with -mwindows and don't link sfml-main, that way you should get a console attached to your application.
-
Great thank you very much I knew that you shouldn't link sfml-main but I didn't know about mwindows. But to be honest I don't really understand what the mwindows flag represents, and also what sfml-main contains and how it is possible to build without it. Anyway, thanks again ;D
Also now that I can see the console I notice this error message when i run the program :
AL lib: (EE) SetChannelMap: Failed to match front-center channel (2) in channel map
Could this come from sfml or my code or is it linked to my OS or my drivers?
-
sfml-main wraps the WinMain function that Windows expects when you want to create an application without console attached and -mwindows changes the subsystem for the same reason.
AL lib: (EE) SetChannelMap: Failed to match front-center channel (2) in channel map
My guess is that you haven't copied the openal32.dll that comes with SFML next to your executable and your executable just picks it up from your system somewhere and it's not fully compatible.
Make sure you use the OpenAL DLL provided by SFML for full compatibility.
-
thank you for the explanations. On the other hand, as for openal32 I have taken it from sfml so that's not it.