www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - VisualD and VS2012

reply Manu <turkeyman gmail.com> writes:
--089e015365e6b6588604f077c4b1
Content-Type: text/plain; charset=UTF-8

Who here uses VisualD under VS2012?

I just installed 2012 and tried it out, I'm having some strange problems
that I don't seem to have under VS2010.
So, the trouble scenario is when I try and link a C++ lib against a VisualD
project.
I set the C++ lib project as a dependency of the D executable project in
the solution dependencies, and then it tries to link, but there are
problems:

1>libcpmtd.lib(xthrow.obj) : error LNK2038: mismatch detected for
'_MSC_VER': value '1600' doesn't match value '1700' in
Fuji_Debug.lib(MFPrimitive_Plug.obj)
1>   Creating library .\FeedBack_Debug.lib and object .\FeedBack_Debug.exp
1>Fuji_Debug.lib(pngerror.obj) : error LNK2001: unresolved external symbol
__report_rangecheckfailure
1>Fuji_Debug.lib(ReadAssImp.obj) : error LNK2019: unresolved external
symbol "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc std  YAXXZ)
referenced in function "char * __cdecl std::_Allocate<char>(unsigned
__int64,char *)" (??$_Allocate D std  YAPEAD_KPEAD Z)
1>Fuji_Debug.lib(ReadAssImp.obj) : error LNK2019: unresolved external
symbol "char const * __cdecl std::_Syserror_map(int)" (?_Syserror_map std
  YAPEBDH Z) referenced in function "public: virtual class
std::error_condition __cdecl
std::_System_error_category::default_error_condition(int)const "
(?default_error_condition _System_error_category std
  UEBA?AVerror_condition 2 H Z)
1>Fuji_Debug.lib(ReadAssImp.obj) : error LNK2019: unresolved external
symbol "char const * __cdecl std::_Winerror_map(int)" (?_Winerror_map std
  YAPEBDH Z) referenced in function "public: virtual class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl
std::_System_error_category::message(int)const " (?message 
_System_error_category std  UEBA?AV?$basic_string DU?$char_traits D std 
 V?$allocator D 2  2 H Z)
1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol
_CrtDbgReportW referenced in function "void __cdecl
std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)"
(?_Debug_message std  YAXPEB_W0I Z)
1>.\FeedBack_Debug.exe : fatal error LNK1120: 5 unresolved externals

Linking the exact same .lib file against a C++ exe project, there is no
problem, so this only occurs when linking to a VisualD built exe.
I suspect that VisualD is either executing the VS2010 linker, even though
I'm running VS2012, or maybe it's trying to link the VS2010 libs instead of
the 2012 libs?

I suspect it's yet another one of those 'paths are all confused' problems,
where the issue lies somewhere between sc.ini and VisualD's overrides...
but maybe not?

Anyone with experience on this?
Rainer?

--089e015365e6b6588604f077c4b1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Who here uses VisualD under VS2012?<div><br></div><div>I j=
ust installed 2012 and tried it out, I&#39;m having some strange problems t=
hat I don&#39;t seem to have under VS2010.</div><div>So, the trouble scenar=
io is when I try and link a C++ lib against a VisualD project.</div>
<div>I set the C++ lib project as a dependency of the D executable project =
in the solution dependencies, and then it tries to link, but there are prob=
lems:</div><div><br></div><div><div><font face=3D"courier new, monospace">1=
&gt;libcpmtd.lib(xthrow.obj) : error LNK2038: mismatch detected for &#39;_M=
SC_VER&#39;: value &#39;1600&#39; doesn&#39;t match value &#39;1700&#39; in=
 Fuji_Debug.lib(MFPrimitive_Plug.obj)</font></div>
<div><font face=3D"courier new, monospace">1&gt; =C2=A0 Creating library .\=
FeedBack_Debug.lib and object .\FeedBack_Debug.exp</font></div><div><span s=
tyle=3D"font-family:&#39;courier new&#39;,monospace">1&gt;Fuji_Debug.lib(pn=
gerror.obj) : error LNK2001: unresolved external symbol __report_rangecheck=
failure</span><br>
</div><div><span style=3D"font-family:&#39;courier new&#39;,monospace">1&gt=
;Fuji_Debug.lib(ReadAssImp.obj) : error LNK2019: unresolved external symbol=
 &quot;void __cdecl std::_Xbad_alloc(void)&quot; (?_Xbad_alloc std  YAXXZ) =
referenced in function &quot;char * __cdecl std::_Allocate&lt;char&gt;(unsi=
gned __int64,char *)&quot; (??$_Allocate D std  YAPEAD_KPEAD Z)</span><br>
</div><div><font face=3D"courier new, monospace">1&gt;Fuji_Debug.lib(ReadAs=
sImp.obj) : error LNK2019: unresolved external symbol &quot;char const * __=
cdecl std::_Syserror_map(int)&quot; (?_Syserror_map std  YAPEBDH Z) referen=
ced in function &quot;public: virtual class std::error_condition __cdecl st=
d::_System_error_category::default_error_condition(int)const &quot; (?defau=
lt_error_condition _System_error_category std  UEBA?AVerror_condition 2 H Z=
)</font></div>
<div><font face=3D"courier new, monospace">1&gt;Fuji_Debug.lib(ReadAssImp.o=
bj) : error LNK2019: unresolved external symbol &quot;char const * __cdecl =
std::_Winerror_map(int)&quot; (?_Winerror_map std  YAPEBDH Z) referenced in=
 function &quot;public: virtual class std::basic_string&lt;char,struct std:=
:char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __cdecl std:=
:_System_error_category::message(int)const &quot; (?message _System_error_c=
ategory std  UEBA?AV?$basic_string DU?$char_traits D std  V?$allocator D 2 =
 2 H Z)</font></div>
<div><font face=3D"courier new, monospace">1&gt;libcpmtd.lib(stdthrow.obj) =
: error LNK2019: unresolved external symbol _CrtDbgReportW referenced in fu=
nction &quot;void __cdecl std::_Debug_message(wchar_t const *,wchar_t const=
 *,unsigned int)&quot; (?_Debug_message std  YAXPEB_W0I Z)</font></div>
<div><font face=3D"courier new, monospace">1&gt;.\FeedBack_Debug.exe : fata=
l error LNK1120: 5 unresolved externals</font></div></div><div><br></div><d=
iv>Linking the exact same .lib file against a C++ exe project, there is no =
problem, so this only occurs when linking to a VisualD built exe.</div>
<div>I suspect that VisualD is either executing the VS2010 linker, even tho=
ugh I&#39;m running VS2012, or maybe it&#39;s trying to link the VS2010 lib=
s instead of the 2012 libs?</div><div><br></div><div>I suspect it&#39;s yet=
 another one of those &#39;paths are all confused&#39; problems, where the =
issue lies somewhere between sc.ini and VisualD&#39;s overrides... but mayb=
e not?</div>
<div><br></div><div>Anyone with experience on this?</div><div>Rainer?</div>=
</div>

--089e015365e6b6588604f077c4b1--
Jan 21 2014
next sibling parent "Bigsandwich" <bigsandwich gmail.com> writes:
Yeah, looks like its linking the 2010 runtime:

http://stackoverflow.com/questions/70013/how-to-detect-if-im-compiling-code-with-visual-studio-2008

http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx

On Tuesday, 21 January 2014 at 09:38:31 UTC, Manu wrote:
 Who here uses VisualD under VS2012?

 I just installed 2012 and tried it out, I'm having some strange 
 problems
 that I don't seem to have under VS2010.
 So, the trouble scenario is when I try and link a C++ lib 
 against a VisualD
 project.
 I set the C++ lib project as a dependency of the D executable 
 project in
 the solution dependencies, and then it tries to link, but there 
 are
 problems:

 1>libcpmtd.lib(xthrow.obj) : error LNK2038: mismatch detected 
 for
 '_MSC_VER': value '1600' doesn't match value '1700' in
 Fuji_Debug.lib(MFPrimitive_Plug.obj)
 1>   Creating library .\FeedBack_Debug.lib and object 
 .\FeedBack_Debug.exp
 1>Fuji_Debug.lib(pngerror.obj) : error LNK2001: unresolved 
 external symbol
 __report_rangecheckfailure
 1>Fuji_Debug.lib(ReadAssImp.obj) : error LNK2019: unresolved 
 external
 symbol "void __cdecl std::_Xbad_alloc(void)" 
 (?_Xbad_alloc std  YAXXZ)
 referenced in function "char * __cdecl 
 std::_Allocate<char>(unsigned
 __int64,char *)" (??$_Allocate D std  YAPEAD_KPEAD Z)
 1>Fuji_Debug.lib(ReadAssImp.obj) : error LNK2019: unresolved 
 external
 symbol "char const * __cdecl std::_Syserror_map(int)" 
 (?_Syserror_map std
   YAPEBDH Z) referenced in function "public: virtual class
 std::error_condition __cdecl
 std::_System_error_category::default_error_condition(int)const "
 (?default_error_condition _System_error_category std
   UEBA?AVerror_condition 2 H Z)
 1>Fuji_Debug.lib(ReadAssImp.obj) : error LNK2019: unresolved 
 external
 symbol "char const * __cdecl std::_Winerror_map(int)" 
 (?_Winerror_map std
   YAPEBDH Z) referenced in function "public: virtual class
 std::basic_string<char,struct std::char_traits<char>,class
 std::allocator<char> > __cdecl
 std::_System_error_category::message(int)const " (?message 
 _System_error_category std  UEBA?AV?$basic_string DU?$char_traits D std 
  V?$allocator D 2  2 H Z)
 1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved 
 external symbol
 _CrtDbgReportW referenced in function "void __cdecl
 std::_Debug_message(wchar_t const *,wchar_t const *,unsigned 
 int)"
 (?_Debug_message std  YAXPEB_W0I Z)
 1>.\FeedBack_Debug.exe : fatal error LNK1120: 5 unresolved 
 externals

 Linking the exact same .lib file against a C++ exe project, 
 there is no
 problem, so this only occurs when linking to a VisualD built 
 exe.
 I suspect that VisualD is either executing the VS2010 linker, 
 even though
 I'm running VS2012, or maybe it's trying to link the VS2010 
 libs instead of
 the 2012 libs?

 I suspect it's yet another one of those 'paths are all 
 confused' problems,
 where the issue lies somewhere between sc.ini and VisualD's 
 overrides...
 but maybe not?

 Anyone with experience on this?
 Rainer?

Jan 21 2014
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/21/2014 1:38 AM, Manu wrote:
 I suspect that VisualD is either executing the VS2010 linker, even though I'm
 running VS2012, or maybe it's trying to link the VS2010 libs instead of the
2012
 libs?

This should be easy to verify one way or the other. Check the paths in the config files. Worst case, delete the VS2010 libs and executables (or simply rename the directory they're in).
Jan 21 2014
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/21/2014 5:09 PM, Manu wrote:
 It's not so simple,  because VisualD attempts to override the paths in the
config
 files, it gets complicated and I have no clear view where the paths used
 actually come from.

VisualD cannot find files that are not there - so remove those files, and then see what happens.
Jan 21 2014
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/21/2014 5:24 PM, Manu wrote:
 On 22 January 2014 11:16, Walter Bright <newshound2 digitalmars.com
 <mailto:newshound2 digitalmars.com>> wrote:

     On 1/21/2014 5:09 PM, Manu wrote:

         It's not so simple,  because VisualD attempts to override the paths in
         the config

         files, it gets complicated and I have no clear view where the paths
used
         actually come from.


     VisualD cannot find files that are not there - so remove those files, and
     then see what happens.


 I'm not sure what you mean... remove sc.ini?

I mean remove these files: "I suspect that VisualD is either executing the VS2010 linker, even though I'm running VS2012, or maybe it's trying to link the VS2010 libs instead of the 2012 libs?" That would clear up the suspicion and the maybes.
Jan 21 2014
parent Walter Bright <newshound2 digitalmars.com> writes:
On 1/21/2014 7:05 PM, Manu wrote:
 I don't think there's any maybe's about it, I amended sc.ini to point to the
 VS2012 paths instead of the original 2010 paths, and VisualD immediately
started
 working fine within VS2012 (except for the CRT problem I bugged separately).
 Are you suggesting I; revert sc.ini to its original VS2010 configuration, then
 remove the VS2010 paths so VD can't find it, and see if it then tries the 2012
 paths as a fallback?

I was only suggesting ways to verify which linker it was executing and which libraries it was linking against.
Jan 21 2014
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
--089e0115eb58d90a9c04f084c712
Content-Type: text/plain; charset=UTF-8

On 22 January 2014 08:33, Walter Bright <newshound2 digitalmars.com> wrote:

 On 1/21/2014 1:38 AM, Manu wrote:

 I suspect that VisualD is either executing the VS2010 linker, even though
 I'm
 running VS2012, or maybe it's trying to link the VS2010 libs instead of
 the 2012
 libs?

This should be easy to verify one way or the other. Check the paths in the config files. Worst case, delete the VS2010 libs and executables (or simply rename the directory they're in).

It's not so simple, because VisualD attempts to override the paths in the config files, it gets complicated and I have no clear view where the paths used actually come from. The reason is, it's common to have many versions of Visual Studio installed in parallel on the same machine, so while working with VisualD, the libs+linker that DMD should be using is the one that belongs to the *active VS environment*; sc.ini should be ignored, it is only configured for one particular VS upon installation, so it's wrong every time you change environment (often). Perhaps the problem here is that sc.ini isn't being ignored; it seems to be configured to point to VS2010... ...yes, seems to be the case. I amended my sc.ini file to point to the VS2012 stuff and it works much better. Only one link error: 1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message std YAXPEB_W0I Z) Strange.. I wonder where that's supposed to come from :/ So, VisualD should be ignoring sc.ini as I understand it, but it seems that it's not... Rainer? --089e0115eb58d90a9c04f084c712 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2= 2 January 2014 08:33, Walter Bright <span dir=3D"ltr">&lt;<a href=3D"mailto= :newshound2 digitalmars.com" target=3D"_blank">newshound2 digitalmars.com</= a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex"><div>On 1/21/2014 1:38 AM, Manu wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex"> I suspect that VisualD is either executing the VS2010 linker, even though I= &#39;m<br> running VS2012, or maybe it&#39;s trying to link the VS2010 libs instead of= the 2012<br> libs?<br> </blockquote> <br></div> This should be easy to verify one way or the other. Check the paths in the = config files. Worst case, delete the VS2010 libs and executables (or simply= rename the directory they&#39;re in).<br> </blockquote></div><br></div><div class=3D"gmail_extra">It&#39;s not so sim= ple, because VisualD attempts to override the paths in the config files, it= gets complicated and I have no clear view where the paths used actually co= me from.</div> <div class=3D"gmail_extra">The reason is, it&#39;s common to have many vers= ions of Visual Studio installed in parallel on the same machine, so while w= orking with VisualD, the libs+linker that DMD should be using is the one th= at belongs to the *active VS environment*; sc.ini should be ignored, it is = only configured for one particular VS upon installation, so it&#39;s wrong = every time you change environment (often).</div> <div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">Perhaps the= problem here is that sc.ini isn&#39;t being ignored; it seems to be config= ured to point to VS2010...</div><div class=3D"gmail_extra">...yes, seems to= be the case. I amended my sc.ini file to point to the VS2012 stuff and it = works much better. Only one link error:</div> <div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra"><div class= =3D"gmail_extra"><font face=3D"courier new, monospace">1&gt;libcpmtd.lib(st= dthrow.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW refe= renced in function &quot;void __cdecl std::_Debug_message(wchar_t const *,w= char_t const *,unsigned int)&quot; (?_Debug_message std YAXPEB_W0I Z)</fon= t></div> <div><br></div><div>Strange.. I wonder where that&#39;s supposed to come fr= om :/<br></div></div><div class=3D"gmail_extra"><br></div><div class=3D"gma= il_extra">So, VisualD should be ignoring sc.ini as I understand it, but it = seems that it&#39;s not... Rainer?</div> </div> --089e0115eb58d90a9c04f084c712--
Jan 21 2014
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
--001a11c24dbc11648504f084fef8
Content-Type: text/plain; charset=UTF-8

On 22 January 2014 11:16, Walter Bright <newshound2 digitalmars.com> wrote:

 On 1/21/2014 5:09 PM, Manu wrote:

 It's not so simple,  because VisualD attempts to override the paths in
 the config

 files, it gets complicated and I have no clear view where the paths used
 actually come from.

VisualD cannot find files that are not there - so remove those files, and then see what happens.

I'm not sure what you mean... remove sc.ini? VisualD doesn't appear to be doing any magic (although it should). It's just taking the usual paths from sc.ini verbatim. This would seem to be the problem. --001a11c24dbc11648504f084fef8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2= 2 January 2014 11:16, Walter Bright <span dir=3D"ltr">&lt;<a href=3D"mailto= :newshound2 digitalmars.com" target=3D"_blank">newshound2 digitalmars.com</= a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">On 1/21/2014 5:09 PM, Manu wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> It&#39;s not so simple, =C2=A0because VisualD attempts to override the path= s in the config<div class=3D"im"><br> files, it gets complicated and I have no clear view where the paths used<br=

</div></blockquote> <br> VisualD cannot find files that are not there - so remove those files, and t= hen see what happens.<br></blockquote><div><br></div><div>I&#39;m not sure = what you mean... remove sc.ini?</div><div>VisualD doesn&#39;t appear to be = doing any magic (although it should). It&#39;s just taking the usual paths = from sc.ini verbatim. This would seem to be the problem.</div> </div></div></div> --001a11c24dbc11648504f084fef8--
Jan 21 2014
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
--047d7b450dc025d21804f0850a61
Content-Type: text/plain; charset=UTF-8

On 22 January 2014 11:16, Walter Bright <newshound2 digitalmars.com> wrote:

 On 1/21/2014 5:09 PM, Manu wrote:

 It's not so simple,  because VisualD attempts to override the paths in
 the config

 files, it gets complicated and I have no clear view where the paths used
 actually come from.

VisualD cannot find files that are not there - so remove those files, and then see what happens.

Slightly OT, but while we're on VisualD, can you chime in on this: https://d.puremagic.com/issues/show_bug.cgi?id=11902 It's really frustrating, on a minute-ly basis >_< --047d7b450dc025d21804f0850a61 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2= 2 January 2014 11:16, Walter Bright <span dir=3D"ltr">&lt;<a href=3D"mailto= :newshound2 digitalmars.com" target=3D"_blank">newshound2 digitalmars.com</= a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex">On 1/21/2014 5:09 PM, Manu wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex"> It&#39;s not so simple, =C2=A0because VisualD attempts to override the path= s in the config<div class=3D"im"><br> files, it gets complicated and I have no clear view where the paths used<br=

</div></blockquote> <br> VisualD cannot find files that are not there - so remove those files, and t= hen see what happens.<br></blockquote><div><br></div><div>Slightly OT, but = while we&#39;re on VisualD, can you chime in on this:=C2=A0<a href=3D"https= ://d.puremagic.com/issues/show_bug.cgi?id=3D11902">https://d.puremagic.com/= issues/show_bug.cgi?id=3D11902</a></div> <div>It&#39;s really frustrating, on a minute-ly basis &gt;_&lt;</div></div=
</div></div>

--047d7b450dc025d21804f0850a61--
Jan 21 2014
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
--089e013a12f8d37fef04f0856f22
Content-Type: text/plain; charset=UTF-8

On 22 January 2014 11:09, Manu <turkeyman gmail.com> wrote:

 ...yes, seems to be the case. I amended my sc.ini file to point to the
 VS2012 stuff and it works much better. Only one link error:

 1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol
 _CrtDbgReportW referenced in function "void __cdecl
 std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)"
 (?_Debug_message std  YAXPEB_W0I Z)

 Strange.. I wonder where that's supposed to come from :/

This final link error appears to be a CRT mismatch. The C++ code is built against the debug CRT, but I think DMD/VisualD (because VD handles the link step manually?) is trying to link the non-debug lib. How can I control which CRT DMD/VisualD will link against? I can't see any options for DMD, and VisualD doesn't seem to expose any option either. Passing /MTd to the linker doesn't have any effect, it's an MSC compiler option, not a linker option. --089e013a12f8d37fef04f0856f22 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2= 2 January 2014 11:09, Manu <span dir=3D"ltr">&lt;<a href=3D"mailto:turkeyma= n gmail.com" target=3D"_blank">turkeyman gmail.com</a>&gt;</span> wrote:<br=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=

<div dir=3D"ltr"><div><div class=3D"h5"><div class=3D"gmail_extra"><div cla= ss=3D"gmail_quote"><span style=3D"color:rgb(34,34,34)">...yes, seems to be = the case. I amended my sc.ini file to point to the VS2012 stuff and it work= s much better. Only one link error:</span><br> </div></div></div></div> <div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra"><div class= =3D"im"><div class=3D"gmail_extra"><font face=3D"courier new, monospace">1&= gt;libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol _= CrtDbgReportW referenced in function &quot;void __cdecl std::_Debug_message= (wchar_t const *,wchar_t const *,unsigned int)&quot; (?_Debug_message std = YAXPEB_W0I Z)</font></div> <div><br></div></div><div>Strange.. I wonder where that&#39;s supposed to c= ome from :/<br></div></div></div></blockquote><div><br></div><div>This fina= l link error appears to be a CRT mismatch. The C++ code is built against th= e debug CRT, but I think DMD/VisualD (because VD handles the link step manu= ally?) is trying to link the non-debug lib.</div> <div>How can I control which CRT DMD/VisualD will link against?</div><div>I= can&#39;t see any options for DMD, and VisualD doesn&#39;t seem to expose = any option either. Passing /MTd to the linker doesn&#39;t have any effect, = it&#39;s an MSC compiler option, not a linker option.</div> </div></div></div> --089e013a12f8d37fef04f0856f22--
Jan 21 2014
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
--001a11c2aa6a2cc11204f086642a
Content-Type: text/plain; charset=UTF-8

On 22 January 2014 12:45, Walter Bright <newshound2 digitalmars.com> wrote:

 On 1/21/2014 5:24 PM, Manu wrote:

 On 22 January 2014 11:16, Walter Bright <newshound2 digitalmars.com

 <mailto:newshound2 digitalmars.com>> wrote:

     On 1/21/2014 5:09 PM, Manu wrote:

         It's not so simple,  because VisualD attempts to override the
 paths in
         the config

         files, it gets complicated and I have no clear view where the
 paths used
         actually come from.


     VisualD cannot find files that are not there - so remove those files,
 and
     then see what happens.


 I'm not sure what you mean... remove sc.ini?

I mean remove these files: "I suspect that VisualD is either executing the VS2010 linker, even though I'm running VS2012, or maybe it's trying to link the VS2010 libs instead of the 2012 libs?" That would clear up the suspicion and the maybes.

I don't think there's any maybe's about it, I amended sc.ini to point to the VS2012 paths instead of the original 2010 paths, and VisualD immediately started working fine within VS2012 (except for the CRT problem I bugged separately). Are you suggesting I; revert sc.ini to its original VS2010 configuration, then remove the VS2010 paths so VD can't find it, and see if it then tries the 2012 paths as a fallback? --001a11c2aa6a2cc11204f086642a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2= 2 January 2014 12:45, Walter Bright <span dir=3D"ltr">&lt;<a href=3D"mailto= :newshound2 digitalmars.com" target=3D"_blank">newshound2 digitalmars.com</= a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">On 1/21/2014 5:24 PM, Manu wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> On 22 January 2014 11:16, Walter Bright &lt;<a href=3D"mailto:newshound2 di= gitalmars.com" target=3D"_blank">newshound2 digitalmars.com</a><div><div cl= ass=3D"h5"><br> &lt;mailto:<a href=3D"mailto:newshound2 digitalmars.com" target=3D"_blank">= newshound2 <u></u>digitalmars.com</a>&gt;&gt; wrote:<br> <br> =C2=A0 =C2=A0 On 1/21/2014 5:09 PM, Manu wrote:<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 It&#39;s not so simple, =C2=A0because VisualD a= ttempts to override the paths in<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 the config<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 files, it gets complicated and I have no clear = view where the paths used<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 actually come from.<br> <br> <br> =C2=A0 =C2=A0 VisualD cannot find files that are not there - so remove thos= e files, and<br> =C2=A0 =C2=A0 then see what happens.<br> <br> <br></div></div><div class=3D"im"> I&#39;m not sure what you mean... remove sc.ini?<br> </div></blockquote> <br> <br> I mean remove these files: &quot;I suspect that VisualD is either executing= the VS2010 linker, even though I&#39;m running VS2012, or maybe it&#39;s t= rying to link the VS2010 libs instead of the 2012 libs?&quot;<br> <br> That would clear up the suspicion and the maybes.<br> </blockquote></div><br></div><div class=3D"gmail_extra">I don&#39;t think t= here&#39;s any maybe&#39;s about it, I amended sc.ini to point to the VS201= 2 paths instead of the original 2010 paths, and VisualD immediately started= working fine within VS2012 (except for the CRT problem I bugged separately= ).</div> <div class=3D"gmail_extra">Are you suggesting I; revert sc.ini to its origi= nal VS2010 configuration, then remove the VS2010 paths so VD can&#39;t find= it, and see if it then tries the 2012 paths as a fallback?</div></div> --001a11c2aa6a2cc11204f086642a--
Jan 21 2014
prev sibling next sibling parent "Rainer Schuetze" <r.sagitario gmx.de> writes:
On Wednesday, 22 January 2014 at 01:25:07 UTC, Manu wrote:
 On 22 January 2014 11:16, Walter Bright 
 <newshound2 digitalmars.com> wrote:

 On 1/21/2014 5:09 PM, Manu wrote:

 It's not so simple,  because VisualD attempts to override the 
 paths in
 the config

 files, it gets complicated and I have no clear view where the 
 paths used
 actually come from.

VisualD cannot find files that are not there - so remove those files, and then see what happens.

I'm not sure what you mean... remove sc.ini? VisualD doesn't appear to be doing any magic (although it should). It's just taking the usual paths from sc.ini verbatim. This would seem to be the problem.

You can see all the environment changes and executed command in the cmd-file in the output directory (or just click the link to the log shown in the output window). One problem might be that the C object files that are part of the phobos library are forcing the inclusion of the library "LIBCMT" (and "OLDNAMES"), and this probably doesn't mix very well with the debug version LIBCMTD. Maybe you can add a command line option to ignore LIBCMT for debug builds with /NODEFAULTLIB:LIBCMT
Jan 22 2014
prev sibling parent Manu <turkeyman gmail.com> writes:
--e89a8ff1ce02a5939f04f097c06e
Content-Type: text/plain; charset=UTF-8

On 23 January 2014 08:38, Rainer Schuetze <r.sagitario gmx.de> wrote:

 On Wednesday, 22 January 2014 at 01:25:07 UTC, Manu wrote:

 On 22 January 2014 11:16, Walter Bright <newshound2 digitalmars.com>
 wrote:

  On 1/21/2014 5:09 PM, Manu wrote:
  It's not so simple,  because VisualD attempts to override the paths in
 the config

 files, it gets complicated and I have no clear view where the paths used
 actually come from.

then see what happens.

VisualD doesn't appear to be doing any magic (although it should). It's just taking the usual paths from sc.ini verbatim. This would seem to be the problem.

You can see all the environment changes and executed command in the cmd-file in the output directory (or just click the link to the log shown in the output window).

Okay, I can see this in the .linkarg file (is that the file you mean?), I wonder if this is the source of the problem: /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\lib\amd64 *\n*C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\x64\" 2 absolute paths concatenated by \n supplied to /LIBPATH:... looks very suspicious. Note: this is under VS2010, I'd need to reconfigure for VS2012 to reproduce the link errors again, but I bet the same concatenated paths with \n occur there too, and the paths would be ignored... falling back to sc.ini?) One problem might be that the C object files that are part of the phobos
 library are forcing the inclusion of the library "LIBCMT" (and "OLDNAMES"),
 and this probably doesn't mix very well with the debug version LIBCMTD.

 Maybe you can add a command line option to ignore LIBCMT for debug builds
 with /NODEFAULTLIB:LIBCMT

That's definitely a potential problem. Any C files in phobos must be built with /Zl (Omit Default Library Name) if being built with MSC. If they're not built with MSC, I can't imagine they would have had the name embedded like MSC does in the first place, so tha wouldn't be the problem in that case...? --e89a8ff1ce02a5939f04f097c06e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2= 3 January 2014 08:38, Rainer Schuetze <span dir=3D"ltr">&lt;<a href=3D"mail= to:r.sagitario gmx.de" target=3D"_blank">r.sagitario gmx.de</a>&gt;</span> = wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex">On Wednesday, 22 January 2014 at 01:25:07 UTC, Manu wrote:= <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex"><div><div> On 22 January 2014 11:16, Walter Bright &lt;<a href=3D"mailto:newshound2 di= gitalmars.com" target=3D"_blank">newshound2 digitalmars.com</a>&gt; wrote:<= br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex"> On 1/21/2014 5:09 PM, Manu wrote:<br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex"> It&#39;s not so simple, =C2=A0because VisualD attempts to override the path= s in<br> the config<br> <br> files, it gets complicated and I have no clear view where the paths used<br=

<br> </blockquote> <br> VisualD cannot find files that are not there - so remove those files, and<b= r> then see what happens.<br> <br> </blockquote> <br></div></div><div> I&#39;m not sure what you mean... remove sc.ini?<br></div><div> VisualD doesn&#39;t appear to be doing any magic (although it should). It&#= 39;s<br> just taking the usual paths from sc.ini verbatim. This would seem to be the= <br> problem.<br> </div></blockquote> <br> You can see all the environment changes and executed command in the cmd-fil= e in the output directory (or just click the link to the log shown in the o= utput window).<br></blockquote><div><br></div><div>Okay, I can see this in = the .linkarg file (is that the file you mean?), I wonder if this is the sou= rce of the problem:</div> <div><br></div><div>/LIBPATH:&quot;C:\Program Files (x86)\Microsoft Visual = Studio 10.0\VC\\lib\amd64<b>\n</b>C:\Program Files (x86)\Microsoft SDKs\Win= dows\v7.0A\lib\x64\&quot;<br></div><div><br></div><div>2 absolute paths con= catenated by \n supplied to /LIBPATH:... looks very suspicious.</div> <div><br></div><div>Note: this is under VS2010, I&#39;d need to reconfigure= for VS2012 to reproduce the link errors again, but I bet the same concaten= ated paths with \n occur there too, and the paths would be ignored... falli= ng back to sc.ini?)</div> <div><br></div><div><br> </div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b= order-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:s= olid;padding-left:1ex"> One problem might be that the C object files that are part of the phobos li= brary are forcing the inclusion of the library &quot;LIBCMT&quot; (and &quo= t;OLDNAMES&quot;), and this probably doesn&#39;t mix very well with the deb= ug version LIBCMTD.<br> <br> Maybe you can add a command line option to ignore LIBCMT for debug builds w= ith /NODEFAULTLIB:LIBCMT<br> </blockquote></div><br></div><div class=3D"gmail_extra">That&#39;s definite= ly a potential problem. Any C files in phobos must be built with /Zl (Omit = Default Library Name) if being built with MSC.</div><div class=3D"gmail_ext= ra"> If they&#39;re not built with MSC, I can&#39;t imagine they would have had = the name embedded like MSC does in the first place, so tha wouldn&#39;t be = the problem in that case...?</div> </div> --e89a8ff1ce02a5939f04f097c06e--
Jan 22 2014