CMake using 32 or 64 compiler - c++

I want to build the bullet physics source code for Visual Studio 2012 but I'm not sure if I have to use as compile Target Visual Studio 2012 or Visual Studio 2012 Win64.
Is the 32/64 referring to my OS or to the source I want to build?
Regards

Win64 refers to the target - if you set the generator to Visual Studio 2012 Win64, you'll be building 64-bit binaries.

Related

Tesseract-OCR build with visual studio 2015 on x64

I searched on the net for the built binaries of Tesseract-OCR for Visual-Studio 2015 on x64 target, but i did not find.
I find the binaries for the Visual Studio 2013 on x64 target here: https://github.com/charlesw/tesseract/tree/master/src/lib/TesseractOcr/x64
Have anyone an idea about where I can find these binaries?
You have to build binaries for the Visual Studio 2015 on x64 using shared solution at visual studio 2015 and tesseract 3.05 on x64

Can not configure compiler and build kit for Qt 5.5

I just have installed on a clean windows 10, visual studio 2015 and Qt Creator 5.5...I have some source code that depend on some libraries (lib) files which I believe were compiled using msvc2012.
The Qt can not compile my project and always complains that selected compiler can not compile for Qt 5.5...I have spent hours on this but still no success...Would someone kindly tell me what should I do? Here is some photos of my Qt build options:
Visual C++ doesn't maintain binaries compatibility between versions, this means that you'll need to use the same Visual Studio version with all the libraries that are exposing C++ functionality (libraries that expose only a C interface can be used with different compiler version).
So you have 2 options:
1) install and use Visual Studio 2012, download and install a Qt version that is built with Visual Studio 2012 (Qt 5.5.0 for Windows 32-bit (VS 2012, 587 MB) ) Note that for VS 2012 there are only 32bit binaries available (if you want x64 you need to build Qt yourself)
or
2) if you want to use Visual Studio 2015, you'll need build Qt yourself with Visual Studio 2015, since there are no already built Qt binaries for Visual Studio 2015. And depending on how the other library is written you might need to also build that with Visual Studio 2015.

What is the difference between vc10, vc11 and vc12 libraries in OpenCV?

I am using OpenCV 2.4.11 and I have 2 folders x64 and x86 both containing vc10, vc11 and vc12 folders, each containing lib folders with the libraries. The libraries look pretty much the same in all folders, with some small differences in size. Firstly, what is the difference between the x64 and x86 folders? Secondly, what is the difference between the vc10, vc11 and vc12 libraries?
They are different builds for each version of Microsoft's Visual Studio compiler.
vc17: The compiler packaged with Visual Studio 2022
vc16: The compiler packaged with Visual Studio 2019
vc15: The compiler packaged with Visual Studio 2017
vc14: The compiler packaged with Visual Studio 2015
vc12: The compiler packaged with Visual Studio 2013
vc11: The compiler packaged with Visual Studio 2012
vc10: The compiler packaged with Visual Studio 2010
It refers to Visual C++ version used for the build. x64 and x86 is the chip architecture 64 vs 32 bit.
It refers to MS Visual Studio version https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History.

MSVCP120d.dll missing

Every time I want to compile my Visual Studio project I get the message that MSVCP120d.dll is missing. Google can't help me. I already installed some redistributables but they didn't help. I also found this:
Msvcp120d.dll Debug version of C++ runtime. No redistribution
allowed.
http://msdn.microsoft.com/en-us/library/windows/hardware/dn448963(v=vs.85).aspx
From the comments, the problem was caused by using dlls that were built with Visual Studio 2013 in a project compiled with Visual Studio 2012. The reason for this was a third party library named the folders containing the dlls vc11, vc12. One has to be careful with any system that uses the compiler version (less than 4 digits) since this does not match the version of Visual Studio (except for Visual Studio 2010).
vc8 = Visual Studio 2005
vc9 = Visual Studio 2008
vc10 = Visual Studio 2010
vc11 = Visual Studio 2012
vc12 = Visual Studio 2013
vc14 = Visual Studio 2015
vc15 = Visual Studio 2017
vc16 = Visual Studio 2019
The Microsoft C++ runtime dlls use a 2 or 3 digit code also based on the compiler version not the version of Visual Studio.
MSVCP80.DLL is from Visual Studio 2005
MSVCP90.DLL is from Visual Studio 2008
MSVCP100.DLL is from Visual Studio 2010
MSVCP110.DLL is from Visual Studio 2012
MSVCP120.DLL is from Visual Studio 2013
MSVCP140.DLL is from Visual Studio 2015, 2017 and 2019
There is binary compatibility between Visual Studio 2015, 2017 and 2019.
I have found myself wasting time searching for a solution on this, and i suspect doing it again in future. So here's a note to myself and others who might find this useful.
If MSVCP120.DLL is missing, that means you have not installed Visual C++ Redistributable Packages for Visual Studio 2013 (x86 and x64). Install that, restart and you should find this file in c:\Windows\System32 .
Now if MSVCP120D.DLL is missing, this means that the application you are trying to run is built in Debug mode. As OP has mentioned, the debug version of the runtime is NOT distributable.
So what do we do?
Well, there is one option that I know of: Go to your Project's Debug configuration > C/C++ > Code Generation > Runtime Library and select Multi-threaded Debug (/MTd). This will statically link MSVCP120D.dll into your executable.
There is also a quick-fix if you just want to get something up quickly: Copy the MSVCP120D.DLL from sys32 (mine is C:\Windows\System32) folder. You may also need MSVCR120D.DLL.
Addendum to the quick fix: To reduce guesswork, you can use dependency walker. Open your application with dependency walker, and you'll see what dll files are needed.
For example, my recent application was built in Visual Studio 2015 (Windows 10 64-bit machine) and I am targeting it to a 32-bit Windows XP machine. Using dependency walker, my application (see screenshot) needs the following files:
opencv_*.dll <-- my own dll files (might also have dependency)
msvcp140d.dll <-- SysWOW64\msvcp140d.dll
kernel32.dll <-- SysWOW64\kernel32.dll
vcruntime140d.dll <-- SysWOW64\vcruntime140d.dll
ucrtbased.dll <-- SysWOW64\ucrtbased.dll
Aside from the opencv* files that I have built, I would also need to copy the system files from C:\Windows\SysWow64 (System32 for 32-bit).
You're welcome. :-)
I have the same problem with you when I implement OpenCV 2.4.11 on VS 2015.
I tried to solve this problem by three methods one by one but they didn't work:
download MSVCP120.DLL online and add it to windows path and OpenCV bin file path
install Visual C++ Redistributable Packages for Visual Studio 2013 both x86 and x86
adjust Debug mode. Go to configuration > C/C++ > Code Generation > Runtime Library and select Multi-threaded Debug (/MTd)
Finally I solved this problem by reinstalling VS2015 with selecting all the options that can be installed, it takes a lot space but it really works.
I downloaded msvcr120d.dll and msvcp120d.dll for 32-bit version and then, I put them into Debug folder of my project. It worked well. (My computer is 64-bit version)
My problem was with x64 compilations deployed to a remote testing machine. I found the x64 versions of msvp120d.dll and msvcr120d.dll in
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\Debug_NonRedist\x64\Microsoft.VC120.DebugCRT
I had the same problem in Visual Studio Pro 2017: missing MSVCP120.dll file in Release mode and missing MSVCP120d.dll file in Debug mode.
I installed Visual C++ Redistributable Packages for Visual Studio 2013 and Update for Visual C++ 2013 and Visual C++ Redistributable Package as suggested here Microsoft answer this fixed the release mode.
For the debug mode what eventually worked was to copy msvcp120d.dll and msvcr120d.dll from a different computer (with Visual studio 2013) into C:\Windows\System32
Alternate approach : without installation of Redistributable package.
Check out in some github for the relevant dll, some people upload the reference dll for their application dependency.
you can download and use them in your project , I have used and run them successfully.
example : https://github.com/Emotiv/community-sdk/find/master
I was building my application on VS 2019 when this issue came up. You can copy these DLLs from this location into debug directory of your application to get going.

Using MSVC10 Libraries with MVSC11

Is there a way to be able to use Visual Studio 2010 libraries with the Visual Studio 2012 Toolset? My project uses freeware libraries that currently are only built with MSVC9 & MSVC10.
I'm already familiar with the Properties->General->Platform Toolset option, but would like to keep it on Visual Studio 2012 (v110) if possible.