I would like to use __fp16 (a Clang language extension) in Visual Studio, but the code is highlighted red by the Visual Studio's code completion whenever I do so. I know that my version of Clang (5_0) supports this extension, and have successfully compiled code using __fp16, but I find that IntelliSense recognizing __fp16 as an error is inconvenient and makes finding errors more difficult. Is there any way for me to configure Visual Studio's IntelliSense so that it stops marking __fp16 as an error? Thank you.
Related
When I decided to switch from CLion to VS22, I found that the code analyzer swears at the new way of writing namespace, that avoid their nesting. I do not know how to make Visual Studio stop considering this an error, as a compiler I used clang and CMake to build, C++ standard is 23
Just for this issue, I suggest you don't use Clang and Cmake, create new project with MSVC and this problem will not occur.
Result:
I used GCC compiler to compile the code blocks editor files. I installed the visual studio editor for a purpose.
Do I need to install GCC compiler again for the visual studio code? Can I use the previous compiler for both code blocks and visual studio editor in same PC?
Yes, you can use the same compiler for two different IDEs.
I'm trying to run code analysis for the first time on my native C++ application. I'm developing using Visual Studio 2013 Ultimate and compiling using the Visual C++ Compiler Nov 2013 CTP (CTP_Nov2013), which is the latest (I believe) compiler from MS for C++11. When trying to run Code Analysis I receive the following warning:
warning D9040: ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
So I'm wondering if it's because I'm using this new compiler that it's not able to run code analysis or what. But I couldn't find any answers by briefly Googling. The MSDN for Visual Studio says code analysis works for all version of VS except Express. Any help would be appreciated, and if it's a "No it doesn't work with that compiler" then that's fine. Just wondering. Thanks!
It seems to work only for x86 builds. If you're doing an x64 build, it won't be available.
Honestly I like Code::Blocks (v13.12) much more than Visual Studio because it doesn't eat up my RAM. I was wondering: I recently installed Visual Studio 2012 Professional, and attempted to set the compiler up to work with Code::Blocks, but upon viewing the files included, I was missing a few critical C++ headers and, in addition, Microsoft's resource compiler, therefore I could not successfully get it working with Code::Blocks. There were no errors when I installed Visual Studio, so why would I be missing headers and their resource compiler? Are those not included in the professional version? Do I seriously need to get a copy of ultimate?
I have made a sudoku solver using SDL (for GUI) on VCpp 2010 IDE.
The program compiles without errors and runs fine. However, i cannot pass the compiled executable on to some people because they don't have msvc dll on their pc.
I thought i could use devc++ that compiles with GCC but this IDE is kinda buggy and just won't let me include some header files.I also have some problems setting up SDL expansions.
So, is there a way to change VisualStudio compiler to GCC?
I really need to stay with VS because it is easy to use and there is a lot of online support.
Short answer: no, you cannot change cl.exe (MS cc compiler) with gcc. Or mingw. (You can with a compatible compiler, like Intel C compiler)
Long answer: you don't need to to that. Use the static linked runtime library, and you don't have a dependency ms dlls anymore (see this answer: How do I make a fully statically linked .exe with Visual Studio Express 2005?)
Or redistribute the VC++ runtime with your app. It's free (http://www.microsoft.com/en-us/download/details.aspx?id=26999)
You don't need to change compiler - they need to download the Visual Studio 2010 redistributable:
http://www.microsoft.com/en-gb/download/details.aspx?id=5555
In short: no. You can't simply use the GCC compiler in Visual Studio.
The long version: you can use a Makefile project to run GCC, but then you lose some of the benefits of using Visual Studio.
I'm not sure when this became a feature in Visual Studio (probably wasn't one in 2013), but it is now possible to change the "Platform Toolset" - and thus the compiler - used by Visual Studio to other compilers like Clang/LLVM and GCC. I have been happily using Clang with VS2017 ever since the MSVC++ compiler bugged up with some 3rd party libraries.
Microsoft made a blog post on the installation instructions and how to switch.