www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11962] New: VisualD needs an option to choose the CRT to link against

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962

           Summary: VisualD needs an option to choose the CRT to link
                    against
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: VisualD
        AssignedTo: nobody puremagic.com
        ReportedBy: turkeyman gmail.com



VisualD needs an option in the project settings to choose the CRT to link
against.
DMD seems to always link LIBCMT.LIB by default, and I can't find how to change
that, particularly for debug builds where the debug variant should be used.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 21 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962


Benjamin Thaut <code benjamin-thaut.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code benjamin-thaut.de



PST ---
This might be a duplicate of bug 10316

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962





 This might be a duplicate of bug 10316
I'm suggesting an option to explicitly choose which one to link be made available in the VisualD project settings. You're suggesting that the default should change when -debug is supplied. I think both are valid bugs. But they are definitely different issues. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 22 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962




PST ---
But don't you agree that they have the same root cause? At least they are
related.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962




Sure, they're both related to the CRT to linkage.

I think you're reading too much into the second sentence of my OP. The 'cause'
of this bug specifically is that VisualD doesn't present an option in the
project settings.
That's unrelated to DMD's choice of default, although sure, the reason I was
motivated to look for the option was that I wanted to change it for debug
builds, though there are many other cases where you want to choose a different
CRT too.
The full suite of CRT's should be available to choose from. Linking against
various libraries demand that you choose different libs, and there are also
times where you'd rather link to the DLL than statically.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario gmx.de



PST ---
A reference to LIBCMT is added by dmd to the object file that contains main,
and it is generated to the C modules in phobos.lib.
I don't think Visual D can do anything about changing it but to add
/NODEFAULTLIB to the linker. Would that be good enough?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 09 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962





 A reference to LIBCMT is added by dmd to the object file that contains main,
 and it is generated to the C modules in phobos.lib.
 I don't think Visual D can do anything about changing it but to add
 /NODEFAULTLIB to the linker. Would that be good enough?
It sounds like DMD needs to introduce this concept as a compile flag, and VisualD needs to add an option in the project settings to select (just like in C++). I'd suggest a workaround that VisualD can implement immediately would be to use /NODEFAULTLIB by default, and also offer the option in the project settings to choose the CRT to link explicitly? The project option could then be switched to support a proper DMD compile flag at a later time when DMD adds such a thing? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 09 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962




PST ---
I have added an option to choose the C runtime in the new beta:
https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.38beta4

It just adds "/NODEFAULTLIB:libcmt msvcrt.lib", for example, to the linker
command line.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 26 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962





 I have added an option to choose the C runtime in the new beta:
 https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.38beta4
 
 It just adds "/NODEFAULTLIB:libcmt msvcrt.lib", for example, to the linker
 command line.
Awesome, this is much needed. I think Walter is also looking at making proper options for this stuff in DMD too. Cheers. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 27 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962




I just noticed there's a typo in the selection menu.
You list 'Dynamic Release' twice, the second should be 'Dynamic Debug'.

Also, it would be best to make debug builds default to the debug one if not
explicitly selected, VS2012 won't link against the release one anymore in debug
builds.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962




PST ---

 I just noticed there's a typo in the selection menu.
 You list 'Dynamic Release' twice, the second should be 'Dynamic Debug'.
Thanks, I fixed this.
 Also, it would be best to make debug builds default to the debug one if not
 explicitly selected, VS2012 won't link against the release one anymore in debug
 builds.
Makes sense, I have changed this, too. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 02 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11962




Awesome, cheers! :)

Hopefully these can be switched for proper DMD options soon.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 02 2014