<div dir="ltr">On 2 September 2013 05:28, Brad Anderson <span dir="ltr"><<a href="mailto:eco@gnuk.net" target="_blank">eco@gnuk.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sunday, 1 September 2013 at 07:42:47 UTC, Walter Bright wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 8/31/2013 7:05 PM, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The only compiler you can realistically use productively in windows is<br>
DMD-Win64, and that doesn't work out of the box.<br>
We needed to mess with sc.ini for quite some time to get the stars aligned such<br>
that it would actually compile and find the linker+libs.<br>
<br>
Walter: DMD needs to internally detect installations of various versions of<br>
VisualStudio, and either 'just work', or amend sc.ini on its own. Or the<br>
installer needs to amend sc.ini. Either way, leaving it to a user to fiddle with<br>
an ini file just isn't acceptable. We had to google solutions to this problem,<br>
and even then, we had trouble with the paths we added to sc.ini; are spaces<br>
acceptable? Do they have quites around them?...<br>
I might also suggest that Microsoft supplied (ie, 'standard'), libraries should<br>
be automatically detected and path entries added in there too:<br>
  C:\Program Files (x86)\Microsoft SDKs\...<br>
  C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\...<br>
These are on basically every windows developers machine, and each of us had to<br>
configure them ourselves.<br>
</blockquote>
<br>
The default sc.ini contains:<br>
-----------------------------<br>
[Version]<br>
version=7.51 Build 020<br>
<br>
[Environment]<br>
LIB="%@P%\..\lib";\dm\lib<br>
DFLAGS="-I%@P%\..\..\src\<u></u>phobos" "-I%@P%\..\..\src\druntime\<u></u>import"<br>
LINKCMD=%@P%\link.exe<br>
LINKCMD64=%VCINSTALLDIR%bin\<u></u>amd64\link.exe<br>
VCINSTALLDIR=%VCINSTALLDIR%<br>
WindowsSdkDir=%WindowsSdkDir%<br>
------------------------------<u></u>----<br>
<br>
When I installed VC 2010, it set the environment variables VCINSTALLDIR and WindowsSdkDir. Then, the default sc.ini should "just work".<br>
<br>
What went wrong, specifically?<br>
</blockquote>
<br>
I can make the installer detect which versions of Visual Studio are installed and the path they are installed.  Would I rather I have the installer modify the installed sc.ini or set an environment variable?<br>
</blockquote></div><br></div><div class="gmail_extra">Avoid environment variables in windows, if you ask me. They are a mess, and they are hard to manage through the stupid UI hidden in system settings->advanced->advanced->environment variables.</div>
<div class="gmail_extra">I think most windows users would consider sc.ini much simpler, but the most important thing is that they need to know it's there, and that it's critical that it's correct.</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Another idea is to enhance DMD's error messages to warns about correct paths in sc.ini when it either fails to find link.exe, or encounters an OMF library (the two tell-tale errors that sc.ini is wrong).</div>
</div>