And should I have the same setting in all config.h
files in the project?
Symptom: nmake
attempting to build parts of the project at the MSVC 'Command Prompt' is throwing inconsistent dll linkage vsnprintf
. Googling for that message says it's usually to do with macros not working consistently. I'm building a package that presumably works; I haven't changed the distro.
Those two Microsoft routines documented here. There's flags in the config.h
files
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
...
/* Define to 1 if you have the `_vsnprintf' function. */
#define HAVE__VSNPRINTF 1
Some but not all config.h
files are generated from config.h.in
/configure.ac
at package install. I seem to have different settings for HAVE_VSNPRINTF
in different config.h
s in different subtrees of the project. I don't want to override the distro, but that doesn't seem right(?)
vsnprintf
is in MSVCRnnn.DLL
where nnn
is the MSVC release; I've installed v12.0/Update 5 Community. Why such an old version? ...
Background
I'm trying to build an ancient version of the Haskell Hugs compiler, September 2006. This is mostly written for Unix environments in C/C++. But I'm building on Windows 8.1, x64-based processor. The instructions I'm following are here; and that repo holds the whole directory structure I'm building (thank you Franklin Chen).
The Unix-oriented part I have built, using MinGW/MSYS, not Cygwin. (64-bit MinGW did not go well, so I reverted and used 32-bit.)
Now I'm trying to build the Windows part, which is essentially a GUI veneer over the Unix -- starting at 'Using Microsoft Visual C++' in the instructions. Visual Studio was not at all happy: the project files are .vcproj
, no longer supported. I tried devenv /Upgrade
to get them as .vcxproj
. But then further problems trying MSBuild
that it couldn't validate against an .xsd
; either Microsoft.Build.{Core|Common}.xsd
gave many rejections about missing types. So I've abandoned that approach.
So I'm at the instructions 'Driving Microsoft Visual C++ from the Command Line', using the MSVC-supplied .bat
file to fire up the command line, as doco'd here. nmake
is running but throwing heaps of inconsistent dll
warnings, for vsnprintf
only. I'm also getting differs in parameter lists
for various routines; is that a knock-on error? Eventually nmake
crashes out, without building the .exe
s I want.