User forums > General (but related to Code::Blocks)
map class
MortenMacFly:
--- Quote from: jmccay on March 15, 2006, 11:10:46 am ---Morten, what version of mingw are you using?
--- End quote ---
Versions: 3.42, 3.44, 3.45 and 4.10... Yes, I'm nuts. ;-)
With regards, Morten.
MortenMacFly:
--- Quote from: jmccay on March 15, 2006, 11:10:46 am ---I commented everything else out. It is strange because if I create a new file with just that information I gave you, it compiles for me too. What's different?
--- End quote ---
Sorry, I don't get it (maybe becasue I have no coffee today ;-)): The code you sent here compiles, too. By your sentence do you mean that this compiles for you, too or not? And if it compiles for you why do you post this example then?! I'm not offending, I'm asking for clarification, please.
With regards, Morten.
Michael:
--- Quote from: MortenMacFly on March 15, 2006, 12:53:24 pm ---Versions: 3.42, 3.44, 3.45 and 4.10... Yes, I'm nuts. ;-)
--- End quote ---
I must admit that I a a bit surprised... :o
I just have/use 3.4.5 and 4.1.0 (in two separate MinGW installation).
Best wishes,
Michael
sethjackson:
--- Quote from: jmccay on March 15, 2006, 03:56:14 am ---The following code gives me 52 errors. I am using mingw 3.4.5, and I got the same results with 3.4.4. What am I missing?
--- Code: --- #include <map>
#include <string>
using namespace std;
typedef std::map<string,int> objPropsMap;
--- End code ---
errors:
--- Code: ---In file included from C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/map:66,
from ptl_interfaces.h:17,
from main.cpp:2:
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:157: error: `bidirectional_iterator_tag' does not name a type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:228: error: `bidirectional_iterator_tag' does not name a type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:325: error: `allocator' has not been declared
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:325: error: expected `>' before '<' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:325: error: expected unqualified-id before '>' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:703: error: expected `,' or `...' before '<' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:705: error: `bool ptl::std::operator==(int)' must have an argument of class or enumerated type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:705: error: `bool ptl::std::operator==(int)' must take exactly two arguments
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: In function `bool ptl::std::operator==(int)':
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:706: error: `__x' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:706: error: `__y' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:707: error: `equal' is not a member of `ptl::std'
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: At global scope:
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:713: error: expected `,' or `...' before '<' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:715: error: `bool ptl::std::operator<(int)' must have an argument of class or enumerated type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:715: error: `bool ptl::std::operator<(int)' must take exactly two arguments
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: In function `bool ptl::std::operator<(int)':
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:716: error: `lexicographical_compare' is not a member of `ptl::std'
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:716: error: `__x' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:717: error: `__y' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: At global scope:
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:723: error: expected `,' or `...' before '<' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:725: error: `bool ptl::std::operator!=(int)' must have an argument of class or enumerated type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:725: error: `bool ptl::std::operator!=(int)' must take exactly two arguments
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: In function `bool ptl::std::operator!=(int)':
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:725: error: `__x' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:725: error: `__y' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: At global scope:
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:730: error: expected `,' or `...' before '<' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:732: error: `bool ptl::std::operator>(int)' must have an argument of class or enumerated type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:732: error: `bool ptl::std::operator>(int)' must take exactly two arguments
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: In function `bool ptl::std::operator>(int)':
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:732: error: `__y' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:732: error: `__x' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: At global scope:
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:737: error: expected `,' or `...' before '<' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:739: error: `bool ptl::std::operator<=(int)' must have an argument of class or enumerated type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:739: error: `bool ptl::std::operator<=(int)' must take exactly two arguments
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: In function `bool ptl::std::operator<=(int)':
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:739: error: `__y' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:739: error: `__x' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: At global scope:
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:744: error: expected `,' or `...' before '<' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:746: error: `bool ptl::std::operator>=(int)' must have an argument of class or enumerated type
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:746: error: `bool ptl::std::operator>=(int)' must take exactly two arguments
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: In function `bool ptl::std::operator>=(int)':
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:746: error: `__x' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:746: error: `__y' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: At global scope:
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: variable or field `swap' declared void
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: `ptl::std::swap' declared as an `inline' variable
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: template declaration of `int ptl::std::swap'
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: `_Rb_tree' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: expected primary-expression before ',' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: expected primary-expression before ',' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: expected primary-expression before ',' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: expected primary-expression before ',' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: expected primary-expression before '>' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:751: error: `__x' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:752: error: `_Rb_tree' was not declared in this scope
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:752: error: expected primary-expression before ',' token
C:/development/compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:752: error: expected primary-expression before ',' token
Process terminated with status 1 (0 minutes, 2 seconds)
52 errors, 0 warnings
--- End code ---
--- End quote ---
Ok you do using namespace std. The you use std::map etc.
Maybe this instead?
--- Code: (cpp) ---
#include <map>
#include <string>
using namespace std;
typedef map<string, int> objPropsMap;
--- End code ---
MortenMacFly:
--- Quote from: Michael on March 15, 2006, 01:02:04 pm ---
--- Quote from: MortenMacFly on March 15, 2006, 12:53:24 pm ---Versions: 3.42, 3.44, 3.45 and 4.10... Yes, I'm nuts. ;-)
--- End quote ---
I must admit that I a a bit surprised... :o
--- End quote ---
Well, it's cross-platform development: 3.45 and 4.10 is on Windows (C::B with MinGW), 3.42 and 3.44 is on two Linux boxes (command line GCC with Makefiles) where I cannot update or install packages. 4.10 is for testing purposes only to be "safe for the future".
With regards, Morten.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version