I need to run Mingw4.6 on my Dev C++ which already has mingw32 3.6 installed!
Does this version of mingw allow us to use 'C++11' ???

Please help!

Recommended Answers

All 13 Replies

You simply install MinGW to any directory (like the recommended directory C:\MinGW). Then, you go into Dev-C++, into the global options "Compiler Options". There, you should be able to set up the directory in which to find the gcc compiler, set that to C:\MinGW\bin (or the equivalent). There are also other directories to set up. Basically, watch for anything that references the old MinGW directories and switch those directories to the new installation (the sub-folder structure is the same for all MinGW versions). Verify that the "programs" names are correct (should be things like gcc.exe). And that's about it when it comes to changing the compiler to a new installation.

As for version 4.6, it allows some C++11, but not all. You can look at this table for a per-feature breakdown of the minimum version required. MinGW now supports version 4.7.0, that would probably be a wiser choice if you want to experiment with C++11.

commented: great info :) +14

MinGW now supports version 4.7.0

I just installed the latest and greatest -- it's up to 4.7.8

Where can I get version gcc4.7 ... I searched but got only 4.6!

Here is the one I installed, you want the first link in the list

I just installed the latest and greatest -- it's up to 4.7.8

I was talking about the GCC version, not the MinGW version. I doubt that MinGW has GCC version 4.7.8, since they would need to have a time-machine a go a couple of years into the future to get that version (if it ever will exist, since GCC versions usually end at 3-4 minor revisions). The current experimental branch is 4.8.0 for a built-from-source, bleeding-edge version of GCC.

I thought gcc is a C compiler, and you need g++ to compile c++ code, but this says I'm wrong about that. gcc just calls g++ for c++ programs.

GCC: "GNU Compiler Collection"

The collection includes:
gcc : C compiler
g++ : C++ compiler
gfortran : Fortran compiler
g77 : Old Fortran 77 compiler
gobjc : Objective-C compiler
gcj : Java compiler
gnat : Ada compiler
gccgo : Go compiler

And you're right, the gcc program will forward source code to other compilers based on the file-extension (but that behavior can be disabled through an option), making the gcc program a kind of one-stop-shop for compiling anything.

"Installing GCC" usually refers to installing all of the above (since, in any case, it is only the front-end that is different between compilers), and the bulk of the installation is the library suites, the back-end programs and all the utility tools (e.g., like the linker, which is the same for all).

I am still not able to compile C++11 codes on devC++!
I installed GCC 4.7 it installed correctly ... but it does not have a c++ folder in "include" folder!
This was the code that I compiled

#include <iostream>
using namespace std;


int main()
{
    enum class Color
    {
        RED,
        BLUE
    };

    enum class Fruit
    {
        BANANA,
        APPLE
    };

    Color a = Color::RED; // note: RED is not accessible any more, we have to use Color::RED
    Fruit b = Fruit::BANANA; // note: BANANA is not accessible any more, we have to use Fruit::BANANA

    if (a == b) // compile error here, as the compiler doesn't know how to compare different types Color and Fruit
        cout << "a and b are equal" << endl;
    else
        cout << "a and b are not equal" << endl;

    return 0;
}

I got the following errors:

Compiler: GCC4.7
Executing  g++.exe...
g++.exe "C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp" -o "C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.exe"    -I"E:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include"  -I"E:\Dev-Cpp\include\c++\3.4.2\backward"  -I"E:\Dev-Cpp\include\c++\3.4.2\mingw32"  -I"E:\Dev-Cpp\include\c++\3.4.2"  -I"E:\Dev-Cpp\include"  -I"C:\MinGW\lib\gcc\mingw32\4.7.0\include"   -L"E:\Dev-Cpp\lib" -L"E:\openCV\opencv\3rdparty\lib" -L"C:\MinGW\lib" 
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp: In function `int main()':
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:9: error: ISO C++ forbids declaration of `RED' with no type
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:11: error: ISO C++ forbids declaration of `BLUE' with no type
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:11: error: expected `;' before '}' token
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:11: error: expected `;' before '}' token
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:15: error: ISO C++ forbids declaration of `BANANA' with no type
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:17: error: ISO C++ forbids declaration of `APPLE' with no type

C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:17: error: expected `;' before '}' token
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:17: error: expected `;' before '}' token
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:9: error: `int main()::Color::RED' is private
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:19: error: within this context
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:9: error: invalid use of non-static data member `main()::Color::RED'
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:19: error: from this location
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:15: error: `int main()::Fruit::BANANA' is private
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:20: error: within this context
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:15: error: invalid use of non-static data member `main()::Fruit::BANANA'
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:20: error: from this location
C:\Users\Animesh Pandey\Documents\Dev_Cpp\qcpp11.cpp:22: error: no match for 'operator==' in 'a == b'

Execution terminated

E:\Dev-Cpp\include\c++\3.4.2\mingw32

It's still using the old thing: E:\Dev-Cpp\include\c++\3.4.2\mingw32

You need to change everything to point to your new mingw/gcc folder.

C:/Mingw/Bin/g++
C:/Mingw/Bin/mingw32-g++
C:/Mingw/Bin/gcc
C:/Mingw/Bin/mingw32-gcc
C:/Mingw/Include
C:/Mingw/lib

Not sure if I missed any.

The installation went correctly but still there is no folder "C++" in C:/MinGW/include that is why I am getting all the errors.

YOUR. CODE. IS. BROKEN.
Read the comments in the code.
It's designed to fail.
In my fully updated MinGW/MSYS install, I compiled it. Note the name I gave it.

dean@stormbringer /c/Workspace/C++/DaniWeb
$ g++ -std=c++11 FOR_73H_LULZ.CPP
FOR_73H_LULZ.CPP: In function 'int main()':
FOR_73H_LULZ.CPP:22:14: error: no match for 'operator==' in 'a == b'
FOR_73H_LULZ.CPP:22:14: note: candidates are:
FOR_73H_LULZ.CPP:22:14: note: operator==(main()::Fruit, main()::Fruit) <built-in>
FOR_73H_LULZ.CPP:22:14: note:   no known conversion for argument 1 from 'main()::Color' to 'main()::Fruit'
FOR_73H_LULZ.CPP:22:14: note: operator==(main()::Color, main()::Color) <built-in>
FOR_73H_LULZ.CPP:22:14: note:   no known conversion for argument 2 from 'main()::Fruit' to 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iosfwd:42:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:39,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/postypes.h:218:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/postypes.h:218:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::fpos<_StateT>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_algobase.h:65:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/char_traits.h:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_pair.h:212:5: note: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_pair.h:212:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::pair<_T1, _T2>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_algobase.h:68:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/char_traits.h:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:293:5: note: template<class _Iterator> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:293:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_algobase.h:68:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/char_traits.h:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:343:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:343:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::reverse_iterator<_IteratorL>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_algobase.h:68:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/char_traits.h:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:1033:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:1033:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_algobase.h:68:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/char_traits.h:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:41,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:1039:5: note: template<class _Iterator> bool std::operator==(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_iterator.h:1039:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::move_iterator<_Iterator>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/string:43:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/locale_classes.h:42,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/ios_base.h:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/allocator.h:119:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_T1>&, const std::allocator<_T2>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/allocator.h:119:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::allocator<_T1>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/string:43:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/locale_classes.h:42,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/ios_base.h:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/allocator.h:124:5: note: template<class _Tp> bool std::operator==(const std::allocator<_Tp1>&, const std::allocator<_Tp1>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/allocator.h:124:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::allocator<_Tp1>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/string:54:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/locale_classes.h:42,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/ios_base.h:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2483:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2483:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/string:54:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/locale_classes.h:42,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/ios_base.h:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2490:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2490:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::basic_string<_CharT>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/string:54:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/locale_classes.h:42,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/ios_base.h:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2504:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2504:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const _CharT*' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/string:54:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/locale_classes.h:42,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/ios_base.h:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:43,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2516:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_string.h:2516:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'main()::Color'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/locale_facets.h:50:0,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/basic_ios.h:39,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ios:45,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ostream:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/iostream:40,
                 from FOR_73H_LULZ.CPP:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/streambuf_iterator.h:206:5: note: template<class _CharT, class _Traits> bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/streambuf_iterator.h:206:5: note:   template argument deduction/substitution failed:
FOR_73H_LULZ.CPP:22:14: note:   mismatched types 'const std::istreambuf_iterator<_CharT, _Traits>' and 'main()::Color'

Don't worry about the lack of C++ in the MinGW include folder. It's not supposed to be there. There IS one in the \lib\include folder though. But that's irrelevant. Your code is designed to break anyway.

And all the C:\Dev-Cpp\Include and C:\Dev-Cpp\lib entries need to go. Find them in your Dev C++ settings, and delete them.

If you want to start over (AND I REALLY REALL RECOMMEND IT), let me suggest several options. (Take a long hard look at G.) All involve uninstalling your current Dev C++.

Step 0. Uninstall your current Dev-C++. Now.

A. Install Dev C++ without MinGW.
Go here: http://sourceforge.net/projects/dev-cpp/files/Binaries/Dev-C%2B%2B%204.9.9.2/
Grab the "No MinGW" setup.

B. Orwell DevC++ (updated and extended version of Dev C++)
Dev C++ was awesome in its day, but it's time to move on. If you still need to cling that old familiar face, go here: http://orwelldevcpp.blogspot.com/

C. wxDev-C++:
Same idea as Orwell, but with wxWidgets packaged in. (Orwell might have a better IDE though).
http://wxdsgn.sourceforge.net/

D. Code::Blocks
http://www.codeblocks.org/

E. NetBeans
Now we're playing with the big kids.
http://www.netbeans.org

F. Eclipse
(Only get this AFTER you've got the hang of NetBeans.)
http://www.eclipse.org

G. Qt
You. Want. This.
http://qt.nokia.com/downloads

It doesn't have to be the exact folders. It's the file that matters..

E:\Dev-Cpp\include\c++\3.4.2\mingw32

is equivalent to: C:/Mingw/include/_mingw32

E:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include

is equivalent to: C:/Mingw/include

E:\Dev-Cpp\lib

is equivalent to: C:/Mingw/lib

Like I said though. I do not have Dev-Cpp installed anymore so I cannot tell you what to put where. I'm not exactly sure why you are using two different versions of Mingw at the same time..

Anyway I just installed it.. Here's what I did:

Tools->Compiler Options->Directories:
Binary: C:/Mingw/bin
Libraries: C:/Mingw/lib
C Includes: C:/Mingw/Include
C++ Includes: C:/Mingw/Include

Tools->Compiler Options->Programs:
gcc: gcc.exe
g++: g++.exe
make: mingw32-make.exe
gdb: gdb.exe
windres: windres.exe
dllwrap: dllwrap.exe
gprof: gprof.exe

Press Ok and ok and ok until the menu closes. Try compiling something. It should work.

Whenever you open Dev-C++ it'll say you don't have a GNU make in your path or devC++ bin. Just ignore it. I cannot remember how to get rid of it without compiling devC++ from source or without NOP-ing that messagebox.

Either way the instructions above will work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.