Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when used on Windows #3326

Open
ChaoII opened this issue Jan 21, 2025 · 2 comments
Open

Crash when used on Windows #3326

ChaoII opened this issue Jan 21, 2025 · 2 comments

Comments

@ChaoII
Copy link

ChaoII commented Jan 21, 2025

When I compile a simple logging program in Release mode on Windows, it crashes, but it works fine when compiled in Debug mode. What could be the reason?

environment

  • windows11 24h2
  • visual studio 2022
  • intel i5-9400 CPU

main code

#include "spdlog/spdlog.h"

int main() {
    spdlog::info("Hello World!");
    return 0;
}

the phenomenon

  • Release
E:\CLionProjects\spdlog_\cmake-build-release\aaa.exe

The process has ended, exit code is -1073741819 (0xC0000005).
  • Debug
E:\CLionProjects\spdlog_\build\aaa.exe
[2025-01-21 10:17:09.925] [info] Hello World!

The process has ended, exit code is 0
@tt4g
Copy link
Contributor

tt4g commented Jan 21, 2025

@ChaoII
Copy link
Author

ChaoII commented Jan 21, 2025

Installing the latest MSVC runtime library resolved the issue. Thank you for all the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants