I need to change the compiler of microsoft in visual studio 2017 c++ professional to another one like gcc .. how can i do that?
By following the instructions.
Microsoft Visual Studio 2017 supports several C++ compilers to suit a wide variety of codebases. In addition to the Microsoft Visual C++ compiler that many of you are likely familiar with, Visual Studio 2017 also supports Clang, GCC, and other compilers when targeting certain platforms.
Related
I am programming in C++ on Windows using Visual Studio 2019 and Qt.
I am using a library created by another programmer that depends on a 3rd party .dll that in turn depends on msvcp140.dll and vcruntime140.dll.
I have installed Platform Toolset Visual Studio 2015 (v140).
However I do not wish to link with this since it seems to prevent me from using ISO C++17 Standard (when I select Platform Toolset="Visual Studio 2015 (v140)" the C++ Language Standard option is removed).
Is it safe to mix Platform Toolset: "Visual Studio 2015 (v140)" and "Visual Studio 2019 (v142)"?
The other programmer claims so. He has made sure that his API does not use any std class (e.g. string) as input or output.
Is this sufficient or is there something else I have to think of?
As Hans Passant says, you can continue to use V142 for your VS2015 library. Hope this document could help you:
The runtime libraries and apps compiled by any of these versions of the compiler are binary-compatible. It's reflected in the C++ toolset major number, which is 14 for all three versions. (The toolset version is v140 for Visual Studio 2015, v141 for 2017, and v142 for 2019). Say you have third-party libraries built by Visual Studio 2015. You can still use them in an application built by Visual Studio 2017 or 2019. There's no need to recompile with a matching toolset. The latest version of the Microsoft Visual C++ Redistributable package (the Redistributable) works for all of them.
I have some code that compiles in Visual C++ 2013, but am told it doesn't build in VC++2010 (as it uses a subtle c++11ism).
Of course, the thing to do is for me to test with both compilers, but...
isn't there a way to turn off c++11 in visual C++ 2013 and have it only accept c++08, as I think gcc's -std=c++98 option does?
For this case, the only way is to change the Platform Toolset to Visual Studio 2010 (v100) in Project -> Properties -> General. Once you change it, you will run VC++2010 compiler under VS2013.
Is it possible to integrate into an application compiled with Visual Studio compiler a DLL compiled with Intel C++ Compiler ?
Are there some special settings to pay attention to for integration?
There seems to be some compatibility options for using Intel C++ Compiler while being compatible with the Visual Studio framework, see https://software.intel.com/en-us/articles/intel-c-compiler-compatibility-with-microsoft-visual-c
Compatibility Options
The following IntelĀ® Compiler options provide compatibility with
different versions of Microsoft Visual C++:
/Qvc8 Microsoft Visual C++ 2005
/Qvc9 Microsoft Visual C++ 2008
/Qvc10
Microsoft Visual C++ 2010
When i write source files in visual studio 2013 and attempt to use the same source files for visual studio 2008, the files have syntax errors. Is it possible for visual studio 2013 to mimic the way that visual studio 2008 compiles?
The language I'm using is C++.
Visual C++ in VS2013 allows c++ 11 compliant code but VS2008 does not, so any syntax you use which is new to the standard will not compile under VS2008. You can either remove the syntax or look into the c++ futures libraries in VS2008 to see if what you need is there, or maybe in boost.
http://msdn.microsoft.com/en-us/library/bb982198(v=vs.90).aspx
and
http://www.boost.org/
New versions of VS tend to do the following which will break compatibility with older versions.
Support new C++ standards
Increase conformance with existing standards
Deprecate/remove proprietary extensions and incorrect implementations
Generally speaking, ISO standard C++ is backward compatible (there will always be some exceptions), which means most of the older syntax will compile on newer standards. So you will likely have more success if you create the sources first in VS2008 and then "migrate" to VS2013 (rather than create it in VS2013 first which may have incompatible syntax with VS2008).
What compiler does visual studio 2012 use for C++ and is it compatible/can I use it with codeblocks?
I want to know because we're required to use Visual Studio 2012 for this school project and I would like to be able to trial some things with codeblocks.
Visual Studio 2012 is using the Microsoft compiler cl.exe. But anyway, you can maintain two projects (one for Visual Studio and one for CodeBlocks) - sharing the same source code.