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

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.

Related

convert Windows Forms Application in C++ to executable file

I am using VS10 C++ and try to convert Windows Forms Application project to executable file: this what I did
select project-> properties -> configuration properties -> C/C++
-> Code Generation -> Runtime library
then I select Multi-threaded Debug(/MTd)
when I built my project I got the following error
A Windows Forms application depends on classes from the .NET Framework Base Class Library. To develop a Windows desktop application in C++ that does NOT depend on .NET, you should use the project template for a Microsoft Foundation Classes (MFC) Application instead. This type of project will compile as a native .exe, instead of a .NET assembly. (By the way, not sure why you would still be using Visual Studio 2010 for C++ development, when the free VS 2015 Community Edition fully supports C++11 and many features of C++14. I do not yet recommend VS 2017 however, since it is still very buggy for C++ development.)
EDIT: In Visual Studio 2017, there is another option (which was not available in VS 2015). If you choose the Windows Desktop Application project template, you will get a project that depends on neither .NET (aka CLR support) nor MFC. I have never tried this approach, but on the surface, it looks very similar to MFC. Again, so far I have found VS 2017 for C++ to be very buggy, so you might have a better experience using MFC in VS 2015 instead.

Failing to migrate a .NET C++ class library from VS 2008 to VS 2012

I have a C++ project that builds a .NET class library that targets the framework 3.5.
This project has been working seamlessly since ages and the classes can be used from, among others, C# applications. It was developed with Visual Studio 2008 Professional.
Now I need to migrate if to Visual Studio 2012 Professional. I have successfully converted the project.
I meet a first problem, which is that the target framework cannot be changed from the project Common Properties, the field is read-only.
I can work around this by editing the .vcxproj file to insert a TargetedFramework tag. The new version does appear in the Common Properties.
I am also able to add references to the .NET assemblies that the library needs (just System, System.Drawing and System.Windows.Forms). The class library compiles correctly to a Dll and I can see its content in the Object Browser.
Now if I try to use it in an application targeting a framework version below 4, I get the message
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1605,5): warning MSB3258: The primary reference "MyClasses" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
I can't see where an indirect reference could come from (my explicit references are to v2.0.50727, which seem to be the file version for 2.0/3.0/3.5).
Do you have any explanation ?
(Expanding on Hans's correct comments)
Visual Studio supports .NET multi-targeting for the C++/CLI language by launching older versions of the C++ compiler.
As a result, the language features are inextricably linked to the .NET framework dependency -- with the newer compilers (Visual C++ 2010 and later), you get C++11 and C++14 features and .NET 4, with the older compilers (Visual C++ 2008 and before) you get .NET 2, but very little C++11 support.
To control this, there's a Platform Toolset selection in the Project Properties, but some manual project file editing is also required.
The Visual C++ Team wrote a blog post about C++ Managed Multi-Targeting in Visual Studio 2010... for later versions, read the documentation on MSDN.

Word (Office) Automation Visual Studio 2013 C++

I have to make a program which can operate with Word documents (edit, view, create) and use C++ with Visual Studio 2013.
I have searched the net and found out VSTO is only available for Visual Basic and C#.
On the Microsoft site there is "How to create an automation project using MFC and a type library" here but seems it is written for very old versions of Visual Studio (like 5.0 and 6.0). When I reach the ninth step "Select the Automation tab." it seems there is no such tab in ClassWizzard in my version of Visual Studio.
Is there any way to perform automation with C++ in newer versions of Visual Studio like 2013?
I found a way here. Actually I am using the "import" method and it worked for me in console mode(COM method also worked, but it seems to me more complicated), I haven`t tested it for GUI yet. There is not C++ documentation, but can be used Visual Basic API with a bit thinking here.

General usage of c++ in visual studio

Is it possible to write a c++ code in Visual Studio without using c++.net?
I'm learning c++ at the moment - Using a book.
But I like the Visual Studio IDE but I don't know if it supports c++ or just c++.net.
I usually create a new (empty) directory and copy the source file(s) into that directory, then when creating the Visual Studio project using the name of the directory. To create a standard C++ console program, choose "... console application", then click on next, clear the check boxes below "empty project", and check "empty project". Once you're into the project, click on project, and "add existing item" to add the source file name(s).
If you want 64 bit mode, you'll need to right click on the project name, then properties, then configuration manager, then new, and select x64. It doesn't matter if you do this for debug or release build, it will set x64 mode for both build modes.
Yes, you can. Visual studio supports two types of C++ applications:
C++/CLI (also called managed C++) - Under Visual Studio project wizard, these kind of projects are grouped under CLR
Native C++ - Under Visual Studio project wizard, these are the projects grouped under Win32, MFC, ATL
Note, however, that you can always turn a project from native to managed and vice versa by going into the project properties and switching on/off the Common Language Runtime Support (/clr), so make sure this option is turned off (No CLR).
Also, be aware that different C++ compilers not always support the same C++ features (even if they are part of the standard), and some C++ compilers implement their own extensions to the language. In the case of Visual Studio, it defines Microsoft Extensions to C and C++ that can be turned off (Za) to be more ANSI compliant.
Visual Studio is actually notoriously late when it comes to supporting the C++ standard. Even now, some C++11 features are not part of the latest Visual Studio so keep this in mind when wondering why something you read in a book does not work in Visual C++.
One last note. Avoid using ATL and MFC if you try to be cross-platform compatible. Even if you don't want to be cross-platform compatible, ATL and MFC are only supported by Visual C++ and using them will lock you to using Visual Studio. Now with the Community Edition, both ATL/MFC are available for free if you are an independent developer or a small company, while historically, ATL/MFC were paid-version only as they are not part of Visual Studio Express editions.
It depends on which variant of Visual Studio you're using. If Express edition you want "for Desktop" in order to do ordinary standard C++. With full Visual Studio there's no problem.

Compiler used by Visual Studio for C++?

I have tried searching on the internet but could not find out the compiler used by Visual Studio for C++ applications.
I wanted to know whether it is freely available & whether it can be used for commercial applications.
Traditionally I have been using Turbo C++.
The problem with Visual Studio C++ Express is that it does not work with some applications.
For example, BRL-CAD which is an open source project works properly with the commercial version but gives some problems for the Express edition.
It seems that there is some problem with MinGW compiler as well.
I am told this by the people running that project.
Visual Studio uses the same compiler for all editions. So, the Express edition uses the same compiler as the Professional edition. There are also no restrictions on producing commercial applications, in either case. There are differences in the advanced features offered by the IDE, but the compilers are the same. So whatever your problems are in getting the project to work, it is nothing to do with the compiler.