about GCC compiler to compile code blocks and visual studio - c++

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.

Related

Where is LLDB in the Visual Studio 2019 clang extension?

Visual Studio comes with built-in clang support that can be enabled when installing. I have installed that support and now have all the clang executables in C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin.
I'm not using Visual Studio for development but just its clang build chain, I'm using CLion instead. Building works fine, but I have trouble debugging. I cannot debug, even though CLion says that it uses the "Bundled LLDB"; something just seems to go wrong, but CLion doesn't tell me what.
I have the suspicion that it somehow chose the wrong LLDB, so I wanted to check whether I can debug in the shell. But then I realized, that I am unable to locate that "bundled LLDB" CLion is mentioning. There is no lldb.exe in C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin. In fact, I couldn't find an lldb in any subdirectory of C:\Program Files (x86)\Microsoft Visual Studio\2019\Community. So where is the debugger for Visual Studio 2019 clang? Or which other debugger could I use? Could I use the native MSVC debugger instead? If yes, where is this one located?
You would have to build it yourself. From the website:
(*) Support for Windows is under active development. Basic
functionality is expected to work, with functionality improving
rapidly. ARM and AArch64 support is more experimental, with more known
issues than the others.

How to make Visual Studio IntelliSense (code completion) recognize Clang extension primitives

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.

C++ - Visual Studio's compiler set up in Code::Blocks?

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 need to change compiler on VS

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.

What does build with cl mean for a c++ program?

the file comclient.cpp here
http://msdn.microsoft.com/en-us/library/aa645738(v=vs.71).aspx
says build with cl. what does that mean?
and also what type of project should I create n vc++? win32, console?
its the commandline compiler for visual studio for visualc++. Visual studio itself is just a mere IDE to help you code easier. Just like Devcpp has gcc and g++ as its compilers.