I need to install ZeroMQ (libzmq) on windows 10 which is running on a VirtualBox. On their official website there are zip files for Visual Studio but on their github they mentioned that Windows10 is not supported.
I downloaded the zip file of "Visual Studio 15 2017 x64" and also installed cygwin and cmake but when I try to install it via cmake I get: The source directory does not appear to contain CMakeList.txt. This is true but there is a zmq.h inside that directory which I thought I should install via cmake. I also tried make exactly how I do it in linux with C files but that one also didn't work.
I have to mention that I don't want to use the ZMQ in Visual Studio. I need to connect a python program running in the host linux to Metatrader via ZMQ and the method that I am following (https://github.com/darwinex/DarwinexLabs/tree/master/tools/dwx_zeromq_connector/v2.0.1#installation) needs libzmq to be installed.
Can someone please help me with installing ZMQ on Windows10 either via cmake or Visual Studio?
Related
I'm adventuring myself into compiling a CMake project using Visual Studio, targeting WSL 1.
Following Microsoft's tutorial to setup a CMake project in Visual Studio and debugging on WSL works fine. Things break when I try to install and use packages using Microsoft's vcpkg package manager after installing vcpkg into a separate Windows directory and integrating it into Visual Studio.
A simple example that fails:
# CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
project(test)
find_package(protobuf CONFIG REQUIRED)
with the following error message:
CMake Error at C:\test\CMakeLists.txt:5 (find_package):
Could not find a package configuration file provided by
"protobuf" with any of the following names
protobufConfig.cmake
protobuf-config.cmake
Add the installation prefix of "unofficial-sqlite3" to CMAKE_PREFIX_PATH or
set "protobuf_DIR" to a directory containing one of the above
files. If "protobuf" provides a separate development package or
SDK, be sure it has been installed.
I'm getting Intellisense to recognize find_package and suggesting to install the package or copying the vcpkg command to clipboard.
The CMake toolchain file is pointing to the "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" file in the WSL-GCC-Debug configuration settings. Installing vcpkg on the Linux system and setting the CMake toolchain file to the corresponding path creates the exact same error output.
Running the "vcpkg install protobuf:x64-linux" command in the terminal creates the following output:
Computing installation plan...
The following packages will be built and installed:
protobuf[core]:x64-linux -> 3.14.0#1
Detecting compiler hash for triplet x64-linux...
Error: while detecting compiler information:
The log content at C:\vcpkg\buildtrees\detect_compiler\stdout-x64-linux.log is:
-- Configuring x64-linux
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:108 (message):
Command failed: ninja -v
Working Directory: C:/vcpkg/buildtrees/detect_compiler/x64-linux-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
C:\vcpkg\buildtrees\detect_compiler\config-x64-linux-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:319 (vcpkg_execute_required_process)
scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
scripts/ports.cmake:128 (include)
Error: vcpkg was unable to detect the active compiler's information. See above for the CMake failure output.
This is not a surprise as I don't expect it to be able to build packages targeting Linux on my Windows machine.
I'm new to cross-platform development and I find documentation on vcpkg + WSL rather sparse. Am I right in assuming that the packages should be installed by vcpkg running on the Linux system? Or do I need to have CMake setup on Windows to make vcpkg work on the Windows side?
Setup:
Windows 10 Build 19041
Visual Studio 2019 (16.8.5) with Visual C++ for Linux Development
Ubuntu 20.04 LTS as WSL
vcpkg commit f226416d2
It seems that I was a bit off track.
vcpkg installed on the Windows machine is accessible on the Linux system the same way as the actual CMake project is accessible. Setting the "CMAKE_TOOLCHAIN_FILE" variable to the absolute "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" path gets translated into "/mnt/c/vcpkg/scripts/buildsystems/vcpkg.cmake".
The missing step was to run the ./bootstrap-vcpkg.sh script on the Linux system to make sure packages can be installed by vcpkg on the Linux system.
I also learned that packages have to be installed manually by running the vcpkg install command since there is no "build in" way to do this via CMake.
I have installed Qt using an offline installer qt-opensource-windows-x86-msvc2015_64-5.8.0. I have visual studio community edition 2017 installed with c++ build tools. because it's compiler was incompatible with the qt version, then I installed visual c++ build tools 2015 from http://landinghub.visualstudio.com/visual-cpp-build-tools . When I try to compile a project it gives an error :-1: error: LNK1158: cannot run 'rc.exe'. Heres how my qt kit looks like,
Can someone figure out whats the mistake and how to fix it.
Thanks.
I've fixed this both on my own machine and on several co-workers machines.
It tends to happen when you have both Visual Studio 2015 and VS 2017 installed. Or more precisely, multiple versions of the Windows SDK installed. When that happens, the vcvars32.bat script (located in your Visual Studio install dir) does not correctly add the location of the resource compiler (rc.exe) to your PATH. Thus, QT Creator runs vcvars32.bat (as specified in Qt Creator under Option->Build&Run->Compilers, but the tools directory for the Windows SDK Kit isn't properly added to the PATH environment.
The simple fix is to add the appropriate version of RC.exe to your path.
Do this from the command line:
cd "c:\program files(x86)"
dir /s rc.exe
You'll get several versions (x86 and x64) and for several versions of the SDK. Add the PATH for where rc.exe lives for the version that corresponds to the SDK and build flavor to your vcvars32.bat startup script.
For example:
PATH="C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86";%PATH%
Restart Qt Creator and that should fix it.
Another fix that worked for me is to uninstall all versions of Visual Studio (and all those side installs of SQL, Windows SDKs, dev tools, etc...). Reboot. Then cleanly install VS 2017 again. Then cleanly uninstall and re-install all of Qt again. That seemed to work for me. A wonderful way to spend an afternoon.
If you update to Qt 5.9 it supports MSVC 2017. However, if you want to get it working with 5.8, I believe you might be missing the Windows SDK. You can download the SDK from Microsoft for Windows 7, 8 or 10, just get whichever version is appropriate for you.
With some googling I found a couple of other somewhat related solutions here, & here, and I've summed them up below:
If you've already got the SDK or installed it and it still doesn't work, it appears that copying rc.exe and rcdll.dll from the WindowsSDK folder to your MSVS installs \VC\bin folder may fix the problem. You might also try copying those same two files to Qt's \Qt*version number**compiler version*\bin.
I'm trying to install the package of Microsoft Visual C++ Redistributable as my xampp apache module cannot be installed. The installation take a very long time to complete. What should I do? Is this common and is all I have to do is wait?
They are dead stuck with this setup progress as the indication
Processing: Windows7_MSU_X64
To install the Visual C++ 2015 Redistributable, you do not need to remove or uninstall the previous versions.
Refer to the error message, you can have a look at the installation log file and search ‘error’, if you can find the error message about Windows6.1-KB2999226-x64.msu, check this similar issue and have a try with the following to troubleshot this issue:
Download the update KB2999226 for your OS edition from here: Update for Universal C Runtime in Windows and before it, since your OS is windows 7, make sure SP1 is installed.
Manually install the KB2999226 as below:
Find the Windows6.1-KB2999226-x64.msu from the folder C:\ProgramData\Package Cache\xxxxx\packages\Patch\x64, which you can the path from the installation log
Create a folder named ‘XXXX’ in that and execute following commands from Admin command prompt
wusa.exe Windows6.1-KB2999226-x64.msu /extract:XXXX
DISM.exe /Online /Add-Package /PackagePath:XXXX\Windows6.1-KB2999226-x64.cab
vc_redist.x64.exe /repair
If you have no idea about the installation log, you can go to %temp% and order by ‘Date modified’, then you should find the installation log, or you can use http://aka.ms/vscollect to gather the installation logs. After using it, you will find vslogs.zip under %temp% folder then upload the file to https://onedrive.live.com/ and share the link here.
I first tried a clean boot and that didn't work so I opened up the task manager to see what other processes I might kill while it was stuck at "Processing: Windows7_MSU_X64" I killed the process titled "windows update standalone installer" and the install completed successfully the moment I killed that process.
Okay, I found the solution for my stucked installation. I updated my Windows manually using wsusoffline tools as my Windows can't seem to update with the usual ways.
Install wsusoffline and select all update for Windows (Windows 7 for me). Make sure to choose the folder to save your update.
Wait for the update to be downloaded
Install the update
Install the MV C++ Redistributable again
Done!
I finally can install my Xampp Apache module and access to the localhost.
I have downloaded sphinxbase.tar.gz and sphinxtrain.tar.gz in windows 7 computer. Build with Visual studio 2010. I have installed Activeperl, python 3.3.
In tutorial http://cmusphinx.sourceforge.net/wiki/tutorialam it says:
For sphinxtrain snapshot
sphinxtrain -t an4 setup
It is possibly for linux systems. How can I run sphinxtrain (snapshot) in windows 7 (64 bit)?
The Windows support is still being tested. I have a patch like this, but haven't committed it yet. The patch is here:
http://pastebin.com/NQyNQEHx
Running on Windows:
first of all, open the Visual Studio project SphinxTrain.sln and build it
copy the following files in bin\Debug or bin\Release:
pocketsphinx_batch.exe and pocketsphinx.dll from the pocketsphinx package
sphinx_fe.exe and sphinxbase.dll from the sphinxbase package
from the directory of your training database run:
python SPHINX_DIR\SphinxTrain\scripts\sphinxtrain.in -t db_name setup
python SPHINX_DIR\SphinxTrain\scripts\sphinxtrain.in run
note that the script first considers bin/Release and, if that doesn't exist, bin/Debug
At the same time you can use scripts from release with binaries from snapshot, results will not be different.
I've just begun a small project in CUDA.
I need to know the following:
Is it possible to compile CUDA code without using/buying Microsoft Visual Studio?
Using Nvcc.exe I get the error "Cannot find compiler cl.exe in path".
I've tried to install a CUDA plugin for NetBeans, but it doesn't work. (with current version of NetBeans)
Platform: Windows 7
Thanks in advance.
Update
As noted in the comments, versions of the SDK after Windows 7's do not include the build tools. If you want to use Microsoft's most recent tools you have to install Visual Studio. Once installed, you can use the tools from the command-line.
At the moment the free versions are the "Community" versions, e.g. Microsoft Visual Studio Community 2015.
You can continue to develop apps for Windows 7 and earlier (and they will run on later versions of Windows) using the old SDK tools as I described before:
Original Answer
If you desperately want to avoid Visual Studio, download and install the Windows SDK. This contains (more or less) the same build tools as Visual Studio.
Then run the Windows SDK Command Prompt (which you'll find on the start menu under Microsoft Windows SDK) to set the path to point to the tools, and you are set.
Or just use Visual C++ Express.
Following the previous comments I've installed Studio Express & VS2010.
This did not solve the "cl.exe not in path" problem.
I solved the problem with the error Cannot find compiler cl.exe in path, by including
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 in PATH,
before installing Windows SDK.
This question also contains valuable information.
For some reason VS2010 & Studio Express failed to set the proper variables in path even after the execution of vsvars32.bat.
Thank you all for your valuable help.
add this options to nvcc
nvcc x.cu <other options> -ccbin "D:\Program Files\Microsoft Visual Studio 11.0\VC\bin"
i use VS2012 and my cl.exe dir is here.
You have to figure out where NVIDIA GPU Computing Toolkit is installed.
In my system it's in "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe" Then
"Edit Environment Variables" on Windows.
Click on New...
Variable name: NVCC
Variable Value: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe
Click on OK.
Use windows subsystem for linux and install ubuntu and nvcc along with gcc and g++ using the ubuntu terminal in windows (gui does not works for linux subsystem for windows). Then configure .bashrc using bash and vim/nano with a 'cd' command to your desired location as it is done in usual linux terminal (makes it easy as bash opens in system32 folder everytime). And then you can compile .cu files using nvcc over bash. As nvcc supports gcc and g++ under linux so it solves the problem. No need to sacrifice peace for switching over to linux or dealing with crappy visual studio. It worked for me.