vlfeat nmake: fatal error U1073: don't know how to make "msvcr100.dll" - nmake

I have downloaded vlfeat source code. I am trying make file using nmake (Microsoft Visual Studio command) to use vlfeat.
The command I have given is:
nmake /f Makefile.mak ARCH=win32
It gives the following error.
NMAKE : fatal error U1073: don't know how to make '"C:\Program
Files\Microsoft Visual Studio 10.0\VC
\redist\x86\Microsoft.VC100.CRT\msvcr100.dll"' Stop.
Please help me to fix it.
Configurations
Windows 7 32 bit OS
VLFeat version: 0.9.17
Microsoft Visual Studio 2010 Express
Regards
Sridhar

I think you need to put the argument to nmake in quotes:
nmake /f Makefile.mak "ARCH=win32"
but as you have not given details of the makefile in your question its hard to help without more details.

Related

Trying to compile Detours.lib as 32bit on a 64bit machine: LNK1112: module machine type 'x86' conflicts with target machine type 'x64'

I'm trying to compile Detours per the instructions. I'd like to compile 32 bit versions of the library, since I plan to hook a 32-bit application. I've googled for answers but they seem to explain the obvious, like switch to 64-bit, but I intend on compiling for 32-bit.
I've used a mix following commands, trying to get it to work:
SET DETOURS_TARGET_PROCESSOR=X86
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
NMAKE
However this results in the following errors:
1) During VCVARSALL:
[ERROR:team_explorer.bat] Directory not found : "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer"
[vcvarsall.bat] Environment initialized for: 'x86'
2) During NMAKE
LIBCMT.lib(chkstk.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
As you can see, despite my best efforts, it is complaining about the target machine type.
I have also tried vcvarsall x64, paired with SET DETOURS_TARGET_PROCESSOR=X86. (Not sure if this is a valid test) This resulted in
iping_d.obj : error LNK2001: unresolved external symbol iping_ProxyFileInfo
Please help me understand what I am doing wrong.
When I choose DETOURS_TARGET_PROCESSOR=X64, it compiles successfully, but it creates a 64-bit lib which I cannot use in my 32bit dll.
I've also tried all this from the VC x86 Native Tools Command Prompt, with the same results.
I've written up an answer to this question on the detours issue tracker, here: https://github.com/microsoft/Detours/issues/98.
Reposting the content here for convenience:
I think the issue here is that you are using the wrong configuration for cross compilation.
To cross compile x86 binaries on a x64 host, you need to:
Launch a "x64_x86 Cross Tools Command Prompt for VS" command prompt.
set DETOURS_TARGET_PROCESSOR=X86
I think you might have accidentally launched a "x86_x64 Cross Tools Command Prompt for VS" command prompt.
If I do this, and then set DETOURS_TARGET_PROCESSOR=X86, I can reproduce the same error. I imagine the same thing would happen if I did the inverse to cross compile for X64.
The naming is very confusing, but you can easily verify by checking the environment variables that are set in the command prompt.
x64_x86 Cross Tools Command Prompt:
C:\>set | findstr VSCMD_ARG
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x64
VSCMD_ARG_TGT_ARCH=x86
Note: VSCMD_ARGT_TGT_ARCH is equal to the architecture we are targeting, and should be equal to DETOURS_TARGET_PROCESSOR.
x86_x64 Cross Tools Command Prompt:
C:\>set | findstr VSCMD_ARG
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x86
VSCMD_ARG_TGT_ARCH=x64
We can see here that the the values are inverted from what we want.

nvcc.exe linking error Microsoft Visual Studio configuration file 'vcvars64.bat' could not found

I want to use nvcc -ptx from windows command line, but I always get this error message:
nvcc : fatal error : Microsoft Visual Studio configuration file 'vcvars64.bat' could not be found for installation at 'C:\Program Files (x86)\Microsoft Visual S
tudio 11.0\VC\bin/../..'
I'm using vs 2012 express edition. What can be the solution?
I have managed to solve the issue and make work with MS Visual Studio Express 2012, here what I did:
Installed MS Visual Studio 2012 Express
Installed cuda_5.5.20_winvista_win7_win8_general_64, the latest version as of 2014-01-16
From this directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin, I have copied x86_amd64 to amd64
In the new directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64, I have created a file vcvars64.bat
In the file vcvars64.bat, just added: CALL setenv /x64
The compilation worked great:
C:\CUDA>nvcc -o square square.cu
Creating library square.lib and object square.exp
C:\CUDA>square.exe
0.000000 1.000000 4.000000 9.000000
16.000000 25.000000 36.000000 49.000000
64.000000 81.000000 100.000000 121.000000
144.000000 169.000000 196.000000 225.000000
From NVIDIA CUDA Compiler Driver document
1.2. Supported Host Compilers
nvcc uses the following compilers for host code compilation:
On Linux platforms
The GNU compiler, gcc, and arm-linux-gnueabihf-g++ for cross compilation to the ARMv7
architecture
On Windows platforms
The Microsoft Visual Studio compiler, cl On both platforms, the compiler found on the current
execution search path will be used, unless nvcc option -compiler-bindir is specified (see File and Path Specifications).
Your visual studio install is asking for .NET v3.5 framework:
http://www.microsoft.com/en-us/download/details.aspx?id=21
Got this info from this: Where can I find Microsoft.Build.Utilities.v3.5
When in your project go to Configuration Properties > CUDA C/C++ > Device and change Code Generation to the following: compute_11,sm_11

How to clean the obj and lib files generated by nmake

I am using nmake in VS 2012 console to compile GDAL, I want to know which command could help me to remove all files generated by nmake command last time.
c:\gdal>nmake clean
Microsoft (R) Program Maintenance Utility Version 11.00.60610.1
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make 'clean'
Stop.
I got it, after having a look into makefile.vc, there is a clean target in it.
Just execute the following command:
nmake /f makefile.vc clean

MSVC 2010 error with Boost on /MT

I am currently having issue compiling my project with MSVC 2010 when /MT is enable in Code generation.
1>LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc100-mt-sgd-1_51.lib'
If i do /MD it works fine but i want to do /MT so i can run the program on any pc.
i cannot seem to find the file "libboost_thread-vc100-mt-sgd-1_51.lib" even on the boost main website : http://sourceforge.net/projects/boost/files/boost-binaries/1.51.0-x64/
using bjam i tried : .\b2 --with-thread variant=release link=static threading=multi runtime-link=static
and still no go, same error as before...any idea how i can fix this?

nmake u1034 separator missing

I've tried to execute make file with nmake in dos-prompt and got the following message:
makefile.in(145) : fatal error U1034: syntax error : separator missing
I took a look into the make file and the line 145 says:
ifeq (#INSTALINFO_FOUND#,yes)
I have absolutely no clue how to fix this ... Do you have any ideas?
Makefile.in indicates the build system you should use is the GNU autotools. These will pre-process your files into GNU format makefile(s). You are then expected to use GNU make with these makefiles.
nmake is a completely different beast and will not be compatible with these files.
I suggest you investigate whether your package is buildable using Microsft tools (hunt out words like nmake or Visual Studio or Windows etc., in its documentation). Your other alternative is to grab a windows port of the Autotools. Cygwin is good, but here be dragons for the unwary.

Resources