MSVC 2010 error with Boost on /MT - visual-c++

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?

Related

What is the missing of "version.lib" in process of building clang with clang-cl?

I successfully built standalone llvm on windows with clang-cl (clang 8.0 downloadable binary) against back-end msvc build tool 2017 with windows 10 sdk using cmake/ninja
After that when I was building standalone clang, it reported "version.lib" in linking phase of clang-rename.exe is missing.
LINK Pass 1: command "....
" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'version.lib'
The weird thing is that word version.lib was slabbed in place amoung various lib\clang?????.libs and the leading -LIBPATH:llvm\\.\lib
I tried looking for version.lib in both build folders of llvm and clang, and found none.
Am I supposed to have verson.lib in llvm\lib?
What am I missing here?

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

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.

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

C1905/LNK1257 Combining x64 Release Libraries

I have set up static library builds of zlib and libpng. Both compile fine into .lib files. I am using MSVC 2010.
With this setup, to use libpng.lib, you need to link against zlib.lib as well. To avoid this, I'm trying to use lib.exe to link zlib into libpng directly. My invocation looks like:
call "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/lib.exe" /OUT:x64\Release\libpng2.lib x64\Release\libpng.lib ..\zlib\x64\Release\zlib.lib /LTCG
In both of their project settings, I explicitly set "Librarian->General->Target Machine" to MachineX64. And, using dumpbin, I can check that the relevant zlib.lib and libpng are both compiled for x64.
Additionally, "General->Whole Program Optimization" and "C/C++->Optimization->Whole Program Optimization" have identical values.
The problem only occurs for x64 Release configurations. x86 Debug, x86 Release, and x64 Debug all work fine.
EDIT: Specifically, the problem is that I get a C1905/LNK1257 error:
C1905: Front end and back end not compatible (must target same processor).
LNK1257: code generation failed
I ran into this problem with VS2012. The lib.exe you're calling is part of the x86 tools. In the amd64 subfolder in VC/bin you will find the x64 versions. Opening a Visual Studio x64 Win64 Command Prompt will set your PATH correctly or you can call the x64 lib.exe directly, specifying its full path as you are doing now.

How do I link assembly with the C library with MSVC++ linker?

I found a simple assembly tutorial online that uses some C functions. I've already used NASM to generate a .obj file but I'm having trouble linking against the C library from the command line. How do I do this with link.exe?
I'm using Visual C++ 2010 Express.
Thanks for the help.
Specify one of the run-time library options: /MD (multithreaded DLL run-time) or /MT (multithreaded static run-time).
In debug builds, specify /MDd or /MTd respectively.

Resources