February 19th, 2013, 09:20 PM
Bloodshed C++ compiler
I hope this is in the right section, I dont see a section devoted to IDE's.
With that said I would like to use g++ as my compiler in Bloodshed instead of the default gcc. I'm told g++ is a little stricter and would like to run some code through it and see the differences.
There is a pull down menu in compiler options but it is not obvious (to me) how to change the compiler. Im using version 22.214.171.124. Ive searched the internet but I honestly cant find a straightforward answer.
Anyone know off hand how to change this? I appreciate any assistance.
February 20th, 2013, 01:18 AM
February 21st, 2013, 04:53 AM
Last I used Dev-C++ I believe that it used g++ automatically for C++ projects.
Either way, there is in fact no difference between gcc and g++ other than by default g++, links C++ libraries, whereas with gcc you would have to explicitly link those libraries.
It is not about g++ being more strict that gcc, but rather that the C++ language has stricter rules about what is valid code. Both gcc and g++ can use either C or C++ compilation.
You can force gcc to perform C++ compilation (or even g++ to performs C compilation) regardlless of the file extension with the -x c++ command line option.
Either way, if stricter checking is what you are after, first at least try compiling with -Wall -Werror, the semantics of C++ code are not identical to C, so if you just want stricter checking, but still want C code, that is possibly the better approach. That said, I would rather recommend embracing C++ fully in any case.
Another issue is that Bloodshed has not maintained Dev-C++ since 2005, you would do well to switch to Orwell Dev-C++ which is the currently maintained fork or Dev-C++. That said, unless they have fixed the abysmal and useless debugger interface, I would suggest Visual C++ Express instead, or Code::Blocks if you want to use GCC/G++ specifically