tsoding / musializer

Music Visualizer
MIT License
957 stars 101 forks source link

Does musializer not have logging? #101

Open Subhranil-Maity opened 8 months ago

Subhranil-Maity commented 8 months ago

This says to check logs but the whole project have no log files

image

Markos-Th09 commented 8 months ago

It refers to the command line logs. Launch musializer from the command line if you want to see them.

Subhranil-Maity commented 8 months ago

But in windows it doesn't show any log

Markos-Th09 commented 8 months ago

I think I know why. The subsystem is switched to windows instead of console, which means stdio is detached.

jgabaut commented 8 months ago

I think I know why. The subsystem is switched to windows instead of console, which means stdio is detached.

I didn't understand what you meant, so I looked around and wanted to leave some references.

I suppose it's related to the usage of /SUBSYSTEM:WINDOWS in nob_win64_msvc.c.

Link to example from msvc nob source

From this page:

WINDOWS The application doesn't require a console, probably because it creates its own windows for interaction with the user. [...]

But this seems to be exactly the approach shown in raylib's build-windows.bat:

set SUBSYSTEM_FLAGS=/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup

Link to raylib source

So I don't really know if trying other values is the way to go around this. Having no MSVC ready, I can't really test this now.

Markos-Th09 commented 8 months ago

The equivalent flag for /subsystem:windows is -mwindows in mingw.

By default windows subsystem gui applications don’t get a console which means they don’t have stdout, stdin and stderr. You manually allocate or attach a console, such as the parent cmd, by using the win32 api and get stdio back and achieve a hybrid console/gui app.