Project builds in x64 but doesn't build in x86 [duplicate] - c++

This question already has answers here:
How to build x86 and/or x64 on Windows from command line with CMAKE?
(3 answers)
How to build as an ia32 solution from visual studio using cmake
(1 answer)
CMake: How to specify target platform?
(4 answers)
Closed 8 months ago.
I need libcurl in my project so i downloaded curl from GitHub and run the CMake on my win10/x64 machine to create a VS .sln file.
The CMake successfully created the .sln and i can build libcurl for x64 but the VS19 doesn't show me option for x86. I want to create library for x86. Here is the screenshot from VS19 configuration manager.
ScreenShot
Any help would be appreciated. thanks

Related

Release C++ code using Visual Studio 2017 [duplicate]

This question already has answers here:
Visual Studio 2017 C++ Exe for any pc (linking vcruntime140.dll)
(2 answers)
Closed 2 years ago.
I have written a C++ project using Visual Studio 2017 in Windows 10. I am trying to run the code in other computers as well.
So, I tried copying the Release folder to another Windows 10 computer. But, when I try to execute the .exe file, it is showing errors: missing dll’s: vcruntime140.dll and ucrtbased.dll.
Please help me in the release process to be followed.
The reason is because your application is dynamically loading the VC runtime which gets installed with the Redistributable package. Typically people can install the Redistributable packages without the full SDK but the easier solution is to just compile your application to statically load the C runtime libraries.
Go to project settings, then C/C++->Code generataion and change your runtime library from /MD to /MT. /MD is dynamic and /MT is static.
Also you can just install the package on your other machine from here https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

NVCC - host compiler targets unsupported OS [duplicate]

This question already has answers here:
Using CUDA with Visual Studio 2017
(9 answers)
Closed 5 years ago.
I've been trying to get CUDA working on my PC. I tried clean (re-)installing the latest drivers and CUDA as well as latest Visual Studio 2017 RC Build Tools. My operating system is Windows 10 (64-bit) build 14393.693, GPU is GTX 1060 6GB (Driver version 378.49), CUDA version 8.0.44.
I took a simple demo from one of the NVIDIA blogs and when I try to compile with "nvcc", I get "nvcc fatal: Host compiler targets unsupported OS".
I setup my envrionment by opening a command prompt in the folder with the .cu file, then running "vcvars64" to add the 64-bit cl.exe to my environment variables. I also tried this with "vcvars32" and I get same result.
I can confirm that cl.exe will compile a "HelloWorld" C file.
Try using a supported host compiler.
Edit: The question has since come up again and gotten a better answer here: Using CUDA with Visual Studio 2017

Visual Studio - how to chain build of projects with different bitness [duplicate]

This question already has an answer here:
Sequentially build configurations in Visual Studio without MSBuild or plugins?
(1 answer)
Closed 6 years ago.
I have a C++ solution with several projects, for example A and B.
In build process I need several sequential steps:
A x32
A x64
B x32
This needed because results of A x32 and A x64 used in pre-build event of B x32.
It's easy to force Visual Studio compile A x32 before B x32 - just add A to B's dependencies. But how we can force Visual Studio to compile A x64 before B x32?
I use Visual Studio 2015
Visual Studio has a "Batch Build" option. Build -> Batch Build. This will support building multiple configurations. Which, as I understand your question, is what you want.
Here is the MS link.
I don't think you can add this permanently to the solution/project configuration.

this program can't start because libeay32.dll is missing from your computer [duplicate]

This question already has an answer here:
Settings of Visual Studio to remove dependency on a dll file during runtime
(1 answer)
Closed 8 years ago.
I don't need libeay32.dll in my project. I have already added ssleay32.lib in my application. This was working fine in visual studio 2010 version of my app. When I ported it in visual studio 2013 this error occurred. Where do I remove the settings so that my application doesn't search for libeay32.dll? My project built successfully. When I try to run the exe file or run the project than this shows up.
It is library for SSL. You probably need to install OpenSSL or just download it from some website and copy it to system folder.

How do I build 64-bit binaries [duplicate]

This question already has answers here:
Compile for x64 with Visual Studio?
(2 answers)
Closed 9 years ago.
ALL,
I have MSVC 2010 and currently working on the program in C++.
The current solution I'm building is for x86. Basically I'm just opening the solution inside an IDE and build it.
Now, what do I do if I need to build 64-bit binary. What to change inside solution?
Thank you.
This MSDN explains exactly, step by step, how to set the Visual Studio Solution for x64: MSDN