I am taking C course and was required to work on VS community 2017. I've been trying to install it on my mac, and the process seem to go ok but I can't find an option to write in C, or to open a project with "Visual C".
It appears that Visual Studio for Mac does not support C or C++. Your options seem to be either Visual Studio Code or running Windows in a virtual machine on your Mac. You can check this post for details: https://social.msdn.microsoft.com/Forums/en-US/ef99e9f5-2a48-423b-b6c0-fa5617d7c63d/how-do-i-get-c-to-work-on-visual-studio-for-mac?forum=visualstudiogeneral
Related
Everytime I see a driver tutorial I see they use visual studio, I was just wondering if it is absolutely required to install it in order to develop windows drivers?
Say for example I would like to compile the following driver: (source)
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DbgPrint("Hello World\n");
return STATUS_SUCCESS;
}
How would I be able to compile/link it without visual studio? I have searched all over the place.
The linked tutorials are based on older WDK builds. You can get the old WDK and follow the tutorial, but I don't really recommend it.
Recently, the common way to develop Windows drivers is to use Visual Studio, but there is also a similar approach to the tutorial, which is developed from the command line environment.
https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/using-the-enterprise-wdk
Of course, you don't have to install Visual Studio as using EWDK.
If you would like to use a different IDE then you must use the Enterprise Windows Driver Kit (EWDK) https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/using-the-enterprise-wdk
After downloading and unzipping the archive you will need to launch LaunchBuildEnv.cmd and then run MsBuild.
Example:
Msbuild my_driver_project.vcxproj /p:configuration=debug /p:platform=x64
This assumes that you will write your own vcxproj file. Details about the file format here: https://learn.microsoft.com/en-us/cpp/build/reference/vcxproj-file-structure?view=vs-2019 and you could look at some driver samples from Microsoft here: https://github.com/microsoft/Windows-driver-samples
If you are just starting out with Windows Drivers I would say that using Visual Studio and WDK is a good idea because you can concentrate more on core Driver Development concepts and after you have something working you can write your own vcxproj file and use the eWDK. Having some examples of vcxproj files is useful.
If you do go down the Visual Studio route you can use Visual Studio Community edition which is free for non-commercial use.
It is important to install Visual Studio prior to WDK because the WDK is essentially a plugin to Visual Studio.
Additional instructions and download links for Visual Studio and WDK https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
I have a hard time trying to do something I think is really simple (I must not be the first one to want to do that). I use Visual Studio 2017 on Windows 7 to do some C code, and I need inflate/deflate for zip.
I search a little, and I found zlib. It seem to be exactly what I search: free, cool copyright, no patent and extensively used and tested in other project.
So, I start to download the latest version (zip of 1.2.11) and here I go, trying to "simply" get the DLL.
However, the documentation state that in order to compile "zlib1.dll", I have to use "./contrib/vstudio/vc..", with ".." the right Visual Studio. But I have Visual Studio 2017 and there are only "vc9" to "vc14", "vc14" being Visual Studio 2015.
The doc say that I have to use Microsoft Visual C++ 2015, and indeed, when I force open with vs2017, I have integrity error.
So I try to install MVC++ 2015, but then it say that I can't install it because I already have something (VS2017) installed.
Is there really no way to achieve something so basic, or there is knowledge that I don't know?
Open source projects can be a challenge to build as their support tends to lag well behind the latest versions of Visual Studio. This is one reason why Visual Studio now supports cmake directly.
That said, the easiest way to build zlib for Windows is just use a NuGet package. I personally use zlib-msvc14-x86 or zlib-msvc14-x64 which are binary compatible with VS 2015 Update 3, VS 2017, and VS 2019. They also provide a static library instead of a DLL.
Not C# or C++, but C. Is there any C support in Visual Studio?
Using the Visual Studio Installer if you click on your already installed version of Visual Studio (in the image I clicked on my VS 2017 Community).
Under Individual components --> Compilers, build tools and run-times you can check Clang/C2. Clang is a C compiler.
Answer: by default it appears not, but you can install the Clang component and it appears you will be able to.
I have an older Visual Studio solution with source code of Quake III Arena (a first person shooter game from 1999). It has also source codes of number of useful tools, which need to be edited in order to work with a new game made from Quake 3 engine. All of this code was written in C and in order to work with this older solution (may switch Visual Studio to compatibility mode), I need to first install Visual C tools into my Visual Studio 2015 Community edition copy.
But Google doesn't help much. It still wants me to download Visual C++, but that's something I already have. Visual C is missing and without it the older solution won't work. Is it possible? I want to test making own modification of the game, creating whole new game out of the engine and modifying the tools needed to create assets for the new game, add them new game as an option. Should I download older Visual Studio instead if there is no Visual C for new VS? Where do I download Visual Studio 2008, the one in which the source code was packed?
I am trying to build Mozilla on Windows 7 64bit
I tried to run this start-shell-msvc2015.bat but got this error.
MozillaBuild Install Directory: C:\mozilla-build\
Visual C++ 2015 Directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\V
C\
Windows SDK Directory: C:\Program Files (x86)\Windows Kits\8.1\
Unable to call a suitable vcvars script. Exiting.
Press any key to continue . . .
I did everything according to their instructions
When in doubt, search Google for the error message. From the first result:
Hallvord R. M. Steen:
To anybody else who might have this problem: it's caused by choices made during installation, and the installer options were somewhat confusing. I don't remember the exact details, but I think the "Default" installation no longer gives you the required scripts - the "Default vs custom" section on https://msdn.microsoft.com/en-us/library/e2h7fzkw%28v=vs.140%29.aspx seems to confirm that you need to choose "Custom" during install and enable Visual C++ tools specifically.
Andrew Overholt: You're right, Hallvord. I went back to my VS2015 installation .exe download, clicked "Modify [the existing installation]" and picked "Common Tools for Visual C++ 2015" under "Programming Languages" > "Visual C++".
Also you'll need at least update 3 if you're using the VS2015 Community Edition. From that Mozilla dev docs page:
Once you’re up to date, download and install Visual Studio Community 2015 Update 3 from Microsoft. If you have an earlier version of Visual Studio, you'll need to upgrade; Firefox relies on C++ features that aren't supported in older versions of Visual Studio. Do not accept the default configuration. Instead, select **Programming Languages > Visual C++ > Common Tools for Visual C++ 2015.*
See also this question on Super User.
Furthermore, the MDN docs actually were updated with this info after that report, and indeed the current build instructions contain, in bold:
Be sure to install the "Common Tools for Visual C++ 2015", which requires a customized installation in Visual Studio 2015.
In the prerequisites section.
Also you'll need at least update 3 if you're using the VS2015 Community Edition. From that Mozilla dev docs page:
Once you’re up to date, download and install Visual Studio Community 2015 Update 3 from Microsoft. If you have an earlier version of Visual Studio, you'll need to upgrade; Firefox relies on C++ features that aren't supported in older versions of Visual Studio. Do not accept the default configuration. Instead, select Programming Languages > Visual C++ > Common Tools for Visual C++ 2015.