Bug 11961 – Can't select CRT to link against

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2014-01-21T18:05:00Z
Last change time
2017-01-16T23:24:30Z
Keywords
pull
Assigned to
nobody
Creator
turkeyman

Comments

Comment #0 by turkeyman — 2014-01-21T18:05:08Z
Can an option be added to DMD to choose which CRT should be used for linking? It seems DMD will always attempt to link to LIBCMT.LIB, but it's conventional to link LIBCMTD.LIB in debug builds, which can cause problems linking against C/C++ code built with MSC. If DMD will choose LIBCMT.LIB by default, it should probably choose LIBCMTD.LIB for debug builds. There are also others, non-multi-threaded, and also the DLL variants, which users may want to select. I think a compiler option is required so people can properly match their C++ code.
Comment #1 by yebblies — 2014-01-21T19:50:29Z
If you pass LIBCMTD.LIB on the command line it _should_ override the default.
Comment #2 by r.sagitario — 2016-11-06T18:56:48Z
Comment #3 by github-bugzilla — 2016-11-09T00:00:17Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/19b02322007c88a79648cc46f5732f50d42c77fd fix issue 11961: allow selecting the MS C runtime to link against https://github.com/dlang/dmd/commit/2c11a0241b88be6eb5416812188c2ca6df196916 Merge pull request #6244 from rainers/select_mscrtlib fix issue 11961: allow selecting the MS C runtime to link against
Comment #4 by turkeyman — 2016-11-09T00:31:33Z
Hooray!!
Comment #5 by github-bugzilla — 2016-12-27T14:40:54Z
Commits pushed to scope at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/19b02322007c88a79648cc46f5732f50d42c77fd fix issue 11961: allow selecting the MS C runtime to link against https://github.com/dlang/dmd/commit/2c11a0241b88be6eb5416812188c2ca6df196916 Merge pull request #6244 from rainers/select_mscrtlib
Comment #6 by github-bugzilla — 2017-01-16T23:24:30Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/19b02322007c88a79648cc46f5732f50d42c77fd fix issue 11961: allow selecting the MS C runtime to link against https://github.com/dlang/dmd/commit/2c11a0241b88be6eb5416812188c2ca6df196916 Merge pull request #6244 from rainers/select_mscrtlib