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

Fix MSVC compatibility by using vswprintf instead of snwprintf #28

Closed
wants to merge 1 commit into from

Conversation

ttytm
Copy link

@ttytm ttytm commented Nov 18, 2024

I was running into the issue of not being able to use the library with MSVC.

osdialog.lib(osdialog_win.obj) : error LNK2019: unresolved external symbol snwprintf referenced in function osdialog_file
C:\Users\vboxuser\Dev\main.exe : fatal error LNK1120: 1 unresolved externals

Reason is that snwprintf is not available in MSVC. Instead, MSVC provides _snwprintf. Though to ensure compatibility with both MSVC and MinGW, I changed it to a vswprintf call.

@ttytm
Copy link
Author

ttytm commented Nov 18, 2024

I see #17 is already there since 4+ years

@ttytm ttytm closed this Nov 18, 2024
@ttytm ttytm deleted the fix/msvc-compatiblity branch November 18, 2024 20:15
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

Successfully merging this pull request may close these issues.

1 participant