Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm using Window 7 OS, I'm Learning C++ for Competitive Programming. I downloaded a version of CodeBlocks but it does not have C++17 (it only has C++98 and C++0x). Is C++17 really important for Learning C++ [preferably for Competitive Programming] or can I carry with my pre-existing CodeBlocks Version? Also, if C++17 is Preferred can you please provide the source to Download C++17 IDE (Codeblocks or Visual Studio). A link would even be more welcomed.
C++17 does not give you access to a new language, it is just an update to an existing language. Most of the competitive programming sites will have c++14 or c++17 running on their servers, so it is preferably good to have one. If you want a pre installed IDE then you can look at the latest version of Visual Studio (probably 2019). Or if you just want a compiler then you can look at MinGW.
Download Visual Studio : https://visualstudio.microsoft.com/vs/
Download MinGW : https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe/
Regarding MinGW, it is just a compiler, if you want to use it, then you have to install something like Visual Studio Code, Sublime Text, Atom, etc and then set it up yourself or look at some tutorials on YouTube. Lastly, if you have any other doubts, comment on this answer and I will be pleased to look into the matter.
The version of CodeBlocks you have installed is not the latest. The latest official release (20.03) provides the bundle MinGW compiler version 8.1.0 which supports C++14 and C++17, I seem to remember.
I advise you to install the IDE (CodeBlocks) and the compiler separately.
By installing Msys2 you have the possibility to always update mingw to the latest version (the latest gcc (10.2) offers support for C++20, as well as C++17, 14 and 11).
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
macOS High Sierra and Xcode 9 come with an old version of LLVM. It's not obvious which version of LLVM it is because of version number mangling. However, it's apparent it's old as the latest version of LLVM supports C++17 but features like std::optional are not available.
I'd like to write some C++17 code using a Mac. What toolchains are available and what has the fewest complications to get working? My thoughts so far:
LLVM via Homebrew -- interference with/by Xcode?
GCC via Homebrew
Above compiled from source
Any preferred method?
This 'answer' is not an answer to your question. These are the handy bookmarks I use.
I'd use Homebrew to install clang++ (see link below). But if you really want Xcode to interop with it, I'd suggest the "bad news" of wait for Apple, or try out their latest beta. And keep in mind that Apple's "Objective-C++" (*.mm) probably requires Apple's secret sauce, if you have some sort of C++ / Cocoa project.
C++17 implementation status:
https://clang.llvm.org/cxx_status.html
Xcode -to- CLang version:
https://gist.github.com/yamaya/2924292
Homebrew to get CLang (clang++):
https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I don't intend this to be an opinion question and I am deliberately avoiding the word "best" for that reason. To frame my question differently;
Is there a fully C++11 compatible Open Source and free (as in free speech, beer and lunch, not as in Express, Lite, Demo, etc.) IDE that provides stable syntax and error highlighting a la IntelliSense, that works out of the box with C++11, or at least with a minimal, easy to follow amount of work?
I am asking this question because I really like the VS2012 environment but have become frustrated with the lackluster degree of C++11 compatibility, and my license is due to expire anyway.
Have you tried the "Visual C++ Compiler November 2012 CTP" update? It adds support for several features (most notably variadic templates) to VC11. The library is not there, and this compiler update is not considered production-ready, but I've found it to be great for working on my projects and using C++11 code till the final product comes out.
Also, I have used Qt Creator (quite independent from the Qt toolkit) for GCC-based C++11 development and it's a great IDE.
First: it's not (mainly) the IDE that needs the C++11 Support, but the compiler. That being said - here are some options:
it is possible to integrate clang into VS2012 (check here: https://github.com/ishani/ClangVSx)
You can use any IDE that supports MINGW as compiler (Windows-GCC-Port) e.g. Eclipse CDT, QT Creator, Code::Blocks, DevCpp
You can use any IDE that supports Clang as compiler (e.g. Code::Blocks)
According to http://www.codelite.org/LiteEditor/ClangIntegration, you can configure codelite to use Clang for code completion vs. gcc. So depending on the IDE, the compiler might provide things like code completion.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
How may I compile a C++ program under the C++11 standard in Ubuntu 11.04 with the most up-to-date compiler, at best using compiler from the distribution, i.e., pre-built package.
GCC 4.6 provides most of the C++11 features. One has only to add the flag -std=c++0x and can use range based for loops, strong enums, UTF strings, etc. For the list of features available in a given version of GCC one can check on http://gcc.gnu.org/projects/cxx0x.html.
Update in 2017: It seem GCC 7 and higher has full C++ 2011 compliance. The rest of the answer below was written in the GCC 4.7 era, and was correct when written in 2011.
Strictly speaking, I can not offer you any 100% C++ 2011 compliant open source compiler, because there aren't any that are 100% there yet.
It looks like you should stay with GCC for now, and GCC 4.6 binaries are included in recent Ubuntu distributions. C++ 2011 is incomplete in GCC 4.6 but contains a lot of 2011 stuff, more than Clang+llvm. It's more than 90% C++ 2011 feature complete. GCC 4.7 contains yet more stuff, but I don't see gcc-4.7 binary packages in Ubuntu 11.x yet, but you can check over here for another way to get gcc 4.7 binaries on ubuntu, or try AskUbuntu, a stackexchange powered site for ubuntu.
According to this page Clang+llvm does not yet offer full C++ 2011 standards compliance, either, and I haven't done the exact math but I see a lot more "No" entries on Clang, versus Gcc.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I want to start learning C++, so I downloaded Microsoft Visual Studio 2010 Express, and the entire application freezes and crashes every time I try to compile (debug and release build) something (I have tried running it in Admin Mode). Is there a good alternative compiler that I could still use VS 2010 as the IDE?
I am not sure why it crashes for you. But there are lots of C++ compilers out there.
http://en.wikipedia.org/wiki/List_of_compilers#C.2FC.2B.2B_compilers
And there is a thread below to use GCC with Visual Studio
GCC with Visual Studio?
if its crashing, I would think its more likely the ide is crashing, not the compiler.
you can use the compiler from the command line as per http://msdn.microsoft.com/en-us/library/ms235639(VS.80).aspx
How about bloodshed dev-cpp. It supports cygwin and mingw.
NO! There is no other compiler that plugs into VS2010 or VS anything else. Each version of VS is tightly tied to its corresponding version of the Microsoft compiler.
As an alternative, how about:
VirtualBox
Linux
g++, perhaps enhanced with Eclipse / C++ for an IDE.
Cost: $0.
Eclipse for C++
If you want something with IDE, I would suggest g++, Eclipse and CDT plugins. Works quite well.
You can use g++ on command line if you are comfortable that way.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm looking for just a compiler for C++ (such as g++) for Windows, that I could run in my cmd.
I'm using notepad++ as my text editor and I want to set up a macro in there that can compile my programs for me.
I do not wish to install Cygwin though.
Any suggestions?
MinGW. It's GCC/G++ for Windows. It's much lighter than Cygwin. The main difference from Cygwin GCC is that it doesn't try to emulate UNIX APIs, you have to use the Windows APIs (and of course the standard C/C++ libraries). It also doesn't provide a shell and utilities like Cygwin, just the compiler.
There is also a related system called MSYS, which provides a shell, etc. like Cygwin, but this is not required. MinGW itself will run in CMD (but I highly suggest using something better like Bash, for your own sanity).
Visual C++ has a command line compiler, cl:
Compiler Command-Line Syntax (C++)
If you don't have Visual Studio, you can download the Windows SDK (newer version) or the Windows Driver Kit for free, and then use the CL.EXE command-line compiler as suggested by #Greg Hewgill.
Digital Mars is excellent.
Probably not what you're looking for, but just to add to the question for completeness, the Intel Optimizing Compiler works great on Windows, Linux and Mac Intel platforms. A bit on the pricey side, but for highly optimized compiles on Intel processors it's second to none.
I think that the TDM-GCC from Twilight Dragon Media is more convenient than the official MinGW release. I found it simpler to install and use.
The old Borland C++ non-IDE compiler is freely available:
http://cc.codegear.com/Free.aspx?id=24778
Here is Wikipedia's background on this free, Windows, command-line compiler:
http://en.wikipedia.org/wiki/Borland_C%2B%2B
With Windows 10, you can use g++ via the Windows Linux Subsystem.
Once you've set it up, install g++ using the bash terminal (this answer on Ask Ubuntu shows you how).
Bear in mind: you will only be able to run compiled C++ programs in the Ubuntu/bash environment, not from cmd/PowerShell directly:
C:\Folder> bash
User#Computer:/mnt/c/Folder$ g++ hello_world.cpp -o hello_world
User#Computer:/mnt/c/Folder$ ./hello_world