Is there a way to limit the MSVC to only support c++11 features but not anything from c++14 or 17?
I am using MSVC++ 14.1 _MSC_VER == 1910 (Visual Studio 2017 version 15.0)
Thanks!
It doesn't appear so. MSVC's C++ compiler does have a /std compiler option, but the documentation only says it can be used as /std:c++14, /std:c++17, or /std:c++latest (to include some features from C++20 drafts).
However, there are not a lot of huge changes between C++11 and C++14, and many of them can be considered "fixes" to things that were inconvenient or just missing from C++11. So maybe /std:c++14 could be close enough for your purposes?
I don't know what specific C++14/17 features are you trying to avoid but you can have a look at Microsoft's Support For C++11/14/17 Features (Modern C++) and select the version of Visual Studio whose feature set is closest to what you are seeking.
You can either use that version of Visual Studio or any later one since Visual Studio supports compilation with older toolsets provided you have them installed.
Related
Is there any way I can use Nintendo TWL or Nitro SDK on Visual Studio, along with their IS-NITRO-DEBUGGER? I know there're some workaround, since I heard people using Visual Studio to work on DS/DSi games. I don't want to use CodeWarrior for this.
PS: I have Visual Studio 2010 and 2012 express edition.
It should be pretty easy, I wrote a little wizard that creates projects for use on the devkitPro toolchain (supports the DS among others) that could probably be modified for use with the official devkit. VS 10 is a bit more friendly with this sort of setup but it works on VS12 as well.
http://pern.drunkencoders.com/
The wizard is here and you will have to install it then open and edit the javascript files...no access to the official devkit so can't comment on how much of an undertaking this might be.
You may simply be able to edit the libnds template makefiles to point at the official toolchain and the wizard will just work as is (other than having to create a debug association).
There are also some good debugging tools if the toolchain that is based on gcc that will let you debug directly in visual studio with memory watches and custom viewers.
I was wondering if anyone knows how to use a new compiler within visual studio, and how the interface between compiler and IDE works to make error messages and source code locations "work" (eg double click goes to location).
Context: trying to integrate clang
I am using NMake for "integrating" clang with Visual Studio. You get the convenience of syntax highlighting and intellisense with the power of LLVM. You have to manually make an nmake buildscript file though (which is quite cumbersome).
There is a clang switch called -fdiagnostics-format=msvc that will output the error and warnings in a format that Visual Studio understands (so you can quickly jump to errors or warnings in your code).
Microsoft provides a Visal Studio Integration SDK which presumably is used by Intel. The Intel compilers can add themselves to the VS IDE and replace the Microsoft compilers.
I'm using Visual C++ in Visual Studio 2010 Express, and in the past I remember when you use a string object and after the dot (eg: .) all the member functions will show in list, but that's not happening.
string myString = "hello world";
myString.
After typing the dot, all functions that are part of the string class don't show. Where in Visual C++ is the setting to make them show?
The functionality you refer to is called IntelliSense in Microsoft-speak, their version of autocompletion for variable names, functions, and methods.
IntelliSense is not supported in Visual Studio 2010 for C++/CLI projects. You will only get IntelliSense for projects written in native C++ code. This is explained in more detail here on the Visual C++ Team Blog. There is also a bug filed on Microsoft Connect; the official word is this:
Thanks for your feedback. Unfortunately in this release we had to cut the intellisense support for C++/CLI due to time constraints. If you want to get some intellisense like quick info and memberlist on the native classes you can get it by choosing no /clr support in the project properties.
Thank You!
Visual C++ Team
This is unfortunate news for many of us who work with C++/CLI projects, and we aren't left with many options. A question regarding those options has been asked here: What are people replacing the missing C++/CLI Intellisense in VS 2010 with? The summary is people are either going back to VS 2008
(I believe the Express Edition of 2008 is still available for download if you look around), or purchasing third-party software such as Visual Assist X that promises to bring back IntelliSense.
It's worth mentioning, however, that Microsoft does not regard C++/CLI as a "first-class" .NET language. There's little (if any) reason to start new projects using the language. It's designed for interop purposes between native C++ and managed C# applications. If you want to write C++, you should target the native Windows API (create a new Win32 project in VS). If you want to write managed .NET code, it is highly recommended that you use C# instead (that's a different version of Express that must be downloaded separately). The syntax is very similar between C++ and C#, but you will still have to learn the .NET Framework and idioms. Both native C++ projects and managed C# projects have very much improved IntelliSense support in Visual Studio 2010, so you're guaranteed to be much happier with either of those.
I'm still using Visual C++ 2003 to maintain and enhance a PC-based program. It is written in C & C++ and just runs on the PC -- not on the web, a phone, in the cloud, or whatever -- and I have no idea what this .NET framework is all about and probably don't need to care at this time.
Anyway, now that I've upgraded my development PC to Windows 7 it's getting more inconvenient to run the old development environments. I think that the latest full version of Visual Studio 2010 would still work to build my project, but the cost is really off-putting. At least in 2003 they offered Visual C++ by itself for around $100, but the freebie Visual C++ .NET 2010 would do me no good at all.
So are there any alternatives to Visual Studio Pro out there these days? I'd even be willing to rewrite the stuff that actually depends on MFC if I can find something to replace it (and still have access to all the Win32 and early C library support).
Why not pick up a second hand copy of Visual Studio 2005 or 2008 on e-bay?
PS: I always considered VS2003 a really bad IDE when compared to VS2005 and VS2008.
Code::Blocks
Eclipse
Dev-C++
You could use Visual Studio 2010 Express if you would replace all MFC-stuff with pure Win32-calls or with another windowing library like Qt, Fox, eGUI, Tk ...
How much GUI is your application? If it's mostly a algorithms and data classes, rewriting the GUI in C++ might make sense. If it's mostly dialogs and lists, rewriting it on the .net-platform would be much faster.
If you are willing to rewrite the stuff that depends on MFC, then you have many options, but I will suggest these two:
Gtk+ - if you want to develop everything using C. If you like c++ then you have c++ bindings gtkmm
Qt - this is a c++ framework which comes with complete development tools too.
I think the free version of Visual Studio Express can still compile plain old C++ without the .NET. The only problems are that it doesn't include MFC or a resource editor. You might be able to use the MFC include files and libraries from your Visual Studio 2003, but I don't know what you would do for resource editing.
wxWidgets is similar enough to MFC that you might pick it up very quickly. The biggest difference is how you lay out dialogs.
Working with Visual Studio 2008 Pro, with Intel Fortran compiler v11, on Windows 7 x64.
I have an Intel Visual Fortran project set up with all the fortran source files. I wish to gradually replace all these subroutines with C/C++ (actually cuda -- bonus points). Simply right clicking on source files in the solution explorer and "add existing item" will put a .cpp or .c or cuda file in the list... but it never gets compiled. Thus any INTERFACE to C code written into the fortran code always fails on the link step.
How does one get a mixed-language project like this? Google has failed me, and all I find are descriptions of the actual interface code, with no instructions on how to implement the visual studio build system.
Thanks in advance.
A Visual Studio project can only contain code elements from a single language. To mix C++, CUDA and Fortran, you must set up a Visual Studio Solution. Then you are free to integrate multiple languages.
A useful guide to setting up a CUDA multi-language VS 2010 Solution can be found here.
[This answer has been assembled from comments and added as a community wiki to get this question off the unanswered list for the CUDA tag].