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 - Cmake build shouldn't pass /NODEFAULTLIB flag when LIBC in ON
Summary: Cmake build shouldn't pass /NODEFAULTLIB flag when LIBC in ON
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.5
Hardware: All Windows 10
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-29 16:33 UTC by rob.ceglinski
Modified: 2017-06-06 17:39 UTC (History)
1 user (show)

See Also:


Attachments
Patch (1.02 KB, patch)
2017-04-29 16:34 UTC, rob.ceglinski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.