-
Notifications
You must be signed in to change notification settings - Fork 474
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
[vcpkg] link to debug sdl in debug mode #1134
Comments
See #1092 for changes that allow "bundled" to build the underlying sdl2 as Debug mode if you'd like to try it. I believe it works for both Windows and Linux (though I haven't looked at it in a few months). I'm hesitant to have it merged however as I discovered "Debug" vs "Release" behavior is an ecosystem thing that affects overall link and use of crt, on Windows in particular. This becomes a problem for me in my own project where I have several crates with Maybe it could still be merged but flagged behind a new feature. I haven't needed nor done that yet. It feels like an ecosystem problem and that the solution would required |
I'm not sure I understand, the debug version is already built in the current version, at least on linux. |
Re Yes,
Re The debug version gets built and linked when #1092 is applied. Currently it is setup to use the underlying default behavior that the This ends up having a lot more implications than just having debug info and less optimization however, as it impacts the options used in compilation for selecting the runtime options. This hasn't been a problem for me at all on Linux (where I am usually compiling statically), but on Windows, it causes all sorts of problems unless you can guarantee the options match for each module that is eventually linked. Specifically I'm talking about the /MT /MD and /LD and their 'd'-suffix variants documented here: https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=msvc-160 Specifically calling attention to this paragraph:
For the |
When building in debug mode, it would be nice to link to the debug version of SDL, since it is built anyway. That would be
libSDL2d.a
andlibSDL2maind.a
instead oflibSDL2.a
andlibSDL2main.a
. I do it manually by renaming the debug variants to the release variants in target/vcpkg.The text was updated successfully, but these errors were encountered: