We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3640

Summary: Cmake build shouldn't pass /NODEFAULTLIB flag when LIBC in ON
Product: SDL Reporter: rob.ceglinski
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: 2.0.5   
Hardware: All   
OS: Windows 10   
Attachments: Patch

Description rob.ceglinski 2017-04-29 16:33:18 UTC
When compiling with CMake/MSVC, use of standard C library is disabled by defualt. I can enable it by passing -DLIBC=ON option to CMake, but as /NODEFAULTLIB is unconditionally passed to the linker, this results in unresolved symbol errors. The solution should be to simply don't pass pass any linker flags when use of stdlib was explicitly requested.
I'm not sure what's the best way to contribute to the project, so I'm attaching relevant patch here.
Comment 1 rob.ceglinski 2017-04-29 16:34:18 UTC
Created attachment 2727 [details]
Patch
Comment 2 Ryan C. Gordon 2017-06-06 17:39:51 UTC
This patch is now https://hg.libsdl.org/SDL/rev/61401688628e, thanks!

--ryan.