I am using cygwin in Windows 7 and is currently struggling with this:
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
I tried to google it but it turns out that most people use Visual Studio to debug.. and I insist to just use cygwin and emacs for the debugging purpose, and cygwin gave me that error. Is there any way for me to fix this?
Thank you for any answers!
You need to set up the environment variables for the Visual Studio compiler so that you can use it in your cygwin environment. I do this with a .BAT file on my desktop which sets up the environment and then starts a cygwin shell with everything ready to roll:
#echo off
call "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
chdir C:\cygwin\bin
bash --login -i
Related
I was wondering if it is possible to open Visual Studio (Not Visual Studio Code) from the ubuntu bash terminal on windows.
Opening Visual Studio Code just works fine but I couldn't find a way on how I could actually open Visual Studio from the command line.
Thank you in advance!
It is possible to refer to anything in the Windows file system from inside WSL. However, understand that, since Visual Studio is a Windows exclusive application, it will run in the context of your host Windows OS, not the Ubuntu guest OS. By contrast, Visual Studio Code is a Linux-native application; so it can run in either context.
Try this:
’/mnt/c/Windows/System32/cmd.exe /c “/mnt/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/devenv.exe”'
If this works, you can save the command as an alias in your .bashrc
References:
https://learn.microsoft.com/en-us/windows/wsl/interop
https://medium.com/#heinrich10/launching-windows-application-on-windows-subsystem-for-linux-wsl-60cc2c165029
I am using window 8, 64-bit.
I follow the steps from wireshark tutorial. I download files from code project. I have installed cygwin but when I try nmake Makefile.nmake, I get -bash: nmake: command not found.
How to solve this problem?
I also found this, I have already installed Visual Studio 2013, should I have the nmake also?
You surely don't have nmake on your computer. Open the Cygwin's setup.exe, follow the steps, then you'll be face to face with a list, type nmake in the search field and DL it.
EDIT: As said in the comments, add the nmake (located in your visual studio directory) path to your environment variable PATH, and beware of spaces for directories like Program Files (x86).
I am trying to compile on cmd using cl and it says that I'm missing mspdb110.dll.
Anyone know how to fix this?
Edit: I added this file path to PATH C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin and the file is a standard hello world program
If you are trying to execute cl.exe from the command line, you need several environment variables added/modified. See here for further details:
Command line compile using cl.exe?
The version mentioned in that post is VS2010, for VS2012, you should be running 'Developer Command Prompt for VS2012', which will set the variables for you.
I am trying to link Qt5.0.2 to Visual Studio 2012 so I can do some GUI programming in C++ inside the Visual Studio environment. I have Downloaded and install ActivePerl and added Perl to the PATH environment variable and Create Perl file extension. I than downloaded Qt and installed it. I opened my Visual Studio Command prompt and changed to my C:Qt\Qt5.0.2 directory. Inside this directory I have a 5.0.2 folder, Tools folder, License folder, MaintenanceTool files and so on. Once inside of my C:Qt\Qt5.0.2 directory, I inserted this command: configure -debug-and-release -opensource -shared -platform win32-msvc2012. I get an error saying 'configure' is not recognized as a an internal or external command, operational program or batch file.
I have no idea what this means and what to do. I have been following my instructions from this aticle http://briolidz.wordpress.com/2012/03/07/compiling-qt-with-visual-studio-2010/
Can anyone help me with this?
Thanks
If I was you, I would follow instructions posted here http://qt-project.org/wiki/Building_Qt_5_from_Git
I'm trying to build an ATL program using the MS command line tools from the Windows SDK 7.1. I've installed the Windows Driver Kit 7.1.0 in order to get the ATL headers and libraries and for the most part I've been successful. I can build it perfectly for x86 systems using either MSBuild or a custom makefile for nmake but when I try and build it for x64 I get the following errors:
<project>\include\atl71\atlplus.h(21): error C3360: 'ATL4': cannot create IAttributeHandler [<project>.vcxproj]
<project>\include\atl71\atlplus.h(21): fatal error C1903: unable to recover from previous error(s); stopping compilation [<project.vcxproj]
0 Warning(s)
2 Error(s)
The really annoying thing is that using the exact same solution file and configuration, Visual Studio can build the x64 version fine. Clearly I'm missing something as all these tools use the same version of cl.exe to perform the actual compilation...
I ran into the same problem using the full DevStudio IDE. I had done exactly as you (copied Win32 settings to thex64 target platform) I Configuration Manager but kept getting that same annoying message. I fixed it by NOT using the WinSDK v7.1 toolchain which is selectable in the project's property pages: specifically, within the "Configuration Properties" node, "General" items. The property is called "Platform Toolset" (again, all this is within the IDE) and I changed my selection in the dropdown from Windows7.1SDK to v100. The latter purports to utilize the DevStudio-only tools and utilities for building just about everything (e.g. HTML Help Compiler is still external). I have a theory that if you download the latest and greatest ATL found in the Windows Driver Kit SDK from Microsoft.
I hope that tidbit may be useful in steering you in the right direction. Good luck!
S. Sean Stagner
Create a batch fiel with the following script, then run it:
pause
setx DevEnvDir %%VSINSTALLDIR%%\Common7\IDE\
setx Framework35Version v3.5
setx FrameworkDir C:\Windows\Microsoft.NET\Framework\
setx FrameworkVersion v4.0.30319
setx LIBPATH %%FrameworkDir%%%%FrameworkVersion%%;%%FrameworkDir%%%%Framework35Version%%
setx PATH ""
setx PATH "%%DevEnvDir%%;%%VSINSTALLDIR%%\VC\Bin;%%VSINSTALLDIR%%\Common7\Tools;%%FrameworkDir%%%%FrameworkVersion%%;%%FrameworkDir%%%%Framework35Version%%;%%VSINSTALLDIR%%\VC\VCPackages;%%PATH%%"
setx VC_PROJECT_ENGINE_NOT_USING_REGISTRY_FOR_INIT 1
setx VCINSTALLDIR %%VSINSTALLDIR%%\Bin\
setx VS100COMNTOOLS ""
setx VSINSTALLDIR "D:\Program Files\Microsoft Visual Studio 10.0"