Do my C++ apps depend on the .Net framework? - c++

I'm using Visual Studio as my IDE. Will my C++ applications depend on .Net, the way C#, VB.NET and ASP.NET do?

No, only the Visual Studio IDE depends on .NET, not your C++ programs written in it.
(Unless you use .NET libraries of course.)

Related

Creating Custom Tools in VS2017 with .NET Standard

I've got a lot of code generation tools that use portable libraries. Now that we're (apparently) dropping portable libraries for .NET Standard, I'm trying to convert my custom code generation tools to this stack. Has anyone been able to do this? I get the message that the Microsoft.VisualStudio.Shell.Interop package is incompatible with both .NET Standard and .Net Core. How are we supposed to make custom tools for Visual Studio when the portable libraries are becoming obsolete and the new libraries aren't interoperable with Visual Studio (real question, not a rant)?

Is Visual C++ a programming language or an IDE?

I've created and finished a project using Visual Studio 2013 and C++ programming language. However this was the first time that I use Visual Studio. (I've created this project by New-> Visual C++ -> General-> Empty project) Before I had always programmed in Linux/Ubuntu.
Now, I need to make a GUI to this project and I decided to use plotLab.(http://www.mitov.com/products/plotlab#overview)
While I was searching in this website to find the libraries that I need to download, I saw the following :
Our component libraries come in 3 versions a VCL
Firemonkey version (for Delphi / C++ Builder / RAD Studio XE3 to XE6)
MFC compatible Visual C++ version,
.NET 2.0-4.5 version (compatible with Visual Studio 2005 to 2013).
I'm confused a bit, because it is written Visual C++ version, and a .NET 2.0-4.5 version (compatible with Visual Studio 2005 to 2013). seperately. What should I do since I've never used .NET.
To other words, I'd like to use this PlotLab in my current C++ project which I've explained above but I'm not sure should I download libraries for Visual C++ or .NET 2.0-4.5 version?
.NET version applies to the .NET languages including Visual Basic, C#, J# and C++/CLI. that the library supports. In short the text means you can either use .NET language of the versions listed or or C++ with one of the specified versions. The two things are separate. As for the question title - Visual Studio is an IDE, but it comes with a collection of compilers for different languages including C++ and all the .NET languages.

Native C++ programs in Visual Studio

I'm confused in my understanding of the relationship between Visual Studio and .NET. I want to write a C++ application, but not a ".NET C++" application. By this, I mean that my understanding is that everything built in .NET land gets compiled to a CLI-compatible intermediary code (just like "JVM" languages like Java and Groovy compile to the same bytecode).
But I don't want my app compiled to an intermediary bytecode...I want it compiled down to raw binary!
Does Visual Studio do this? Or is .NET forced down my throat the minute I choose VS as my C++ IDE? If so, whats a "raw C++" alternative to VS?
Thanks in advance!
Visual Studio is an IDE, which is orthogonal to any specific language or compiler.
Visual C++ is a compiler that supports the C, C++, and C++/CLI languages.
In Visual Studio, create a Visual C++ project from one of the 'Win32' (as opposed to 'CLR') project templates and your program won't have any .NET dependency.
there is that /clr compiler switch when compiling a c++ app. Without it, you will get a pure native binary and cannot use any. NET specific features within your code.
By selecting a project template or by setting the corresponding project property, VS will automatically choose if the switch is on or off.
Visual Studio still supports 100% native C++ applications as will as managed applications. When creating a new app just choose the "Win32 Console Application" to create a native application. For existing applications you can change / verify by doing the following
Right Click on the project and select "Properties"
Navigate to Configuration Properties -> C/C++
Make sure that "Common Language Runtime Support" is set to "No Common Language Runtime Support"

Do I have to use "Visual" C++ in VS 2008?

I am new to Visual Studio 2008 (.NET Framework 3.5) and am Developing a Windows Form application.
Starting the IDE, the only options for a New Project are under the categories:
Visual Basic
Visual C#
Visual C++
I did Visual C++ -> CLR -> Windows Forms Application
However, the template code is in the "Visual C++" syntx.
How do I create a new GUI project with plain vanilla C/C++ using Visual Studio 2008?
Please note, the last time I did this was with MFC in Visual Studio C++ 6.0
If I am missing the underlying principal please explain.
Thank You!
Example: http://msdn.microsoft.com/en-us/library/ms235634%28v=vs.90%29.aspx
Long story short - you cannot.
Windows Forms is a .NET framework and not a C++ framework. This in turn means that you cannot use C++ to work with it. What Microsoft did is invented their own language that is C++-ish, but compiles into CLI bytecode (likely with native code mix-in, but I am not sure). Before it was "Managed C++", now it is C++/CLI (what you have linked as an example is not C++, but C++/CLI).
For plain C++ projects you have to choose "Win32 Project", "Win32 Console Application" or "Empty Project".. But then you cannot work with Windows Forms. Your options would be to use other GUI libraries like GTK, Qt, WxWidgets. There are tons of GUI frameworks. Or perhaps you would prefer sticking with Win32 API. My personal choice is Qt. And no Visual Studio at all.
Hope it clarifies things a bit for you. Good luck!
The "Visual" is just the name of the product. It's not a different language. c++/cli however, is a different language, and that's what you're seeing. If you want to make a Windows Form application, you will have to use .net. C++/cli is a .net language, C++ is not. You can make actual C++ applications with Visual C++, just not Windows Form applications.
First, there is no such thing as "Visual C++", in terms of a language. There is C++/CLI, which is a sort of variation of C++ that has extensions for building .NET libraries and programs using a C++-like language.
Windows Forms is a technology based on the CLR: common language runtime. AKA: .NET. You cannot build a Windows Forms application with just ISO C++. At some point, you have to talk to the CLR, which is at minimum going to require some COM support. And you'd probably be better off with C++/CLI and doing it that way.
Visual in this case means Windows Programming. And that include designing GUI (Graphical User Interface) for your application which will work in Windows environment. The language itself is C++.
You have two options available to develop Window Application.
Use Window API's only
Use a frame such as MFC,WPF etc
The language is always C++ but it has accommodation for Windows and therefore Visual C++.
Btw if you want plain C/C++, choose Visual C++ and start a console application. Make sure you select empty project.

Visual C++ .net vs C++

Kindly can any one point to the main differences between C++ and Visual C++ .net?
Is Visual C++ .net a managed code like C# and VB? Does it use the same FCL and BCL? Can C# and VB dlls be consumed from a visual C++ .Net project?
C++ is a language; Visual C++ is a compiler for the C, C++, and C++/CLI languages.
What you probably mean to ask about is the difference between C++ and C++/CLI, but a quick SO search will demonstrate that question to already be answered many times over.
Is Visual C++ .net a managed code like C# and VB?
C++/CLI is, yes.
Does it use the same FCL and BCL?
Yes.
Can C# and VB dlls be consumed from a visual C++ .Net project?
From a C++/CLI project, yes; and the reverse is also true.
C++ is a language.
Microsoft Visual C++ is a development environment for the C++ language. It includes a compiler, editor, debugger and much more.