[m-rev.] for review: fix build problems with Visual Studio 2013

Paul Bone paul at bone.id.au
Tue Jan 28 15:33:11 AEDT 2014


On Mon, Jan 27, 2014 at 04:38:40AM +1100, Julien Fischer wrote:
>
> For review by anyone -- the main thing that needs to reviewed here is the
> changes to README.MS-VisualC.
>
> @@ -21,19 +21,15 @@ has been installed.
>  To make MSVC and its supporting tools available under the Cygwin or MSYS shells
>  do the following:
>
> -(1) Open the Windows Command Prompt.
> -    (Start -> All Programs -> Accessories -> Command Prompt on Windows XP)
> -    (Start -> Accessories -> Command Prompt on Windows 7)
> +(1) Open the Visual Studio Command Prompt.
> +    This can typically be found in
> + +         Start -> Visual Studio YYYY -> Visual Studio Tools
>

Is that a problem in your e-mail or in your file?  I know gmail does weird
things so it's hard for me to tell (maybe use mutt ;-) )

> -(2) Enter the following command:
> +    although the name and location vary between different versions and editions
> +    of Visual Studio.  (YYYY is the year.)
>
> -       C:\> "%VS90COMNTOOLS%"\vsvars32.bat
> - -    This command sets up the environment for MSVC version 9.0 (2008).
> -    For MSVC version 10.0 (2010) the corresponding environment variable
> -    is VS100COMNTOOLS.
> -
> -(3) Enter the following command to start the MSYS shell:
> +(2) Enter the following command to start the MSYS shell:
>
>          C:\> C:\MinGW\MSYS\1.0\msys.bat
>
> @@ -47,6 +43,22 @@ In order to install the C#, Erlang or Java grades you will require a C#,
>  Erlang or Java compiler to be included in the Windows PATH.
>  (See the relevant README files for further details, e.g. README.Java etc)
>
> +
> +*** IMPORTANT NOTE FOR USERS OF VISUAL STUDIO 2013 ***
> +
> +The Makefile for the Boehm garbage collector requires the files NtWin32.Mak and
> +Win32.Mak to be present in the build environment.  These files are *not*
> +included with Visual Studio 2013 and must be copied or included from the
> +Windows 7 (or 7.1) SDK.
> +

is 7.x sufficient?

> +To include the above files, append the SDK directory to the end of the INCLUDE
> +environment variable, for example (with the Windows 7.1 SDK):
> +
> +   C:\> set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1a\Include
> +

is that line too long?  Is it possible to break up a line on the windows
shell by using a backslash?

> +Alternatively, you can just copy the NtWin32.Mak and Win32.Mak files into the
> +"boehm_gc" directory of the Mercury source tree.
> +
>  -----------------------------------------------------------------------------
>
>  CONFIGURATION AND INSTALLATION
> @@ -135,6 +147,14 @@ The MSVC port currently has a number of limitation:
>
>  * Creation of shared libraries (DLLs) is not currently supported.
>
> +* The '--c-debug' option currently has no effect with MSVC since enabling
> +  it disables some C compiler optimizations and also breaks parallel builds.
> +

Reorder these two reasons.  Things breaking is (usually) more important than
disabling some optimisations.

> +  If you *really* want to enable support for C level debugging, then enable the
> +  commented out definition of DEBUG_OPTS in scripts/mgnuc.in (in the "cl" case)
> +  and also enable the commented out definition of CFLAGS_FOR_DEBUG in
> +  configure.ac (in the "msvc*" case).
> +

Will the readers know that they may need to run autoconf, configure and
rebuild Mercury after these steps?

The rest (the build system changes) look fine.

Thanks.


-- 
Paul Bone
http://www.bone.id.au



More information about the reviews mailing list