C
Carl Youngblood
I recognize that I may not be giving sufficient information with this,
but in the interest of not bogging the list down with too much code,
I'll try and post just a little information and then if that is
insufficient I can post more.
I have a C++ project that compiles fine with no warnings or errors.
It is relying on STL classes where appropriate. In one of my classes,
I needed to create a static member variable that was an STL map. By
merely adding the line #include <map>, I suddenly get a whole slew of
compile errors, all of which appear to be in the standard include
files, such as:
[carl@e236014 initcard]$ make
g++ -O2 -ansi -pedantic -Wall -c -o cryptokiclass.o cryptokiclass.cc
g++ -O2 -ansi -pedantic -Wall -c -o listener.o listener.cc
g++ -O2 -ansi -pedantic -Wall -c -o main.o main.cc
g++ -O2 -ansi -pedantic -Wall -c -o slot.o slot.cc
In file included from /usr/include/c++/3.3.3/string:53,
from /usr/include/c++/3.3.3/stdexcept:45,
from cryptokiclass.h:5,
from slot.h:7,
from slot.cc:1:
/usr/include/c++/3.3.3/bits/basic_string.h: In member function `int
std::basic_string<_CharT, _Traits, _Alloc>::compare(const
std::basic_string<_CharT, _Traits, _Alloc>&) const':
/usr/include/c++/3.3.3/bits/basic_string.h:830: error: syntax error
before `;'
token
.... etc. etc.
If I remove the #include <map> line, they all go away. Any ideas as
to what I can do to fix this?
Thank you very much for your time.
Carl Youngblood
but in the interest of not bogging the list down with too much code,
I'll try and post just a little information and then if that is
insufficient I can post more.
I have a C++ project that compiles fine with no warnings or errors.
It is relying on STL classes where appropriate. In one of my classes,
I needed to create a static member variable that was an STL map. By
merely adding the line #include <map>, I suddenly get a whole slew of
compile errors, all of which appear to be in the standard include
files, such as:
[carl@e236014 initcard]$ make
g++ -O2 -ansi -pedantic -Wall -c -o cryptokiclass.o cryptokiclass.cc
g++ -O2 -ansi -pedantic -Wall -c -o listener.o listener.cc
g++ -O2 -ansi -pedantic -Wall -c -o main.o main.cc
g++ -O2 -ansi -pedantic -Wall -c -o slot.o slot.cc
In file included from /usr/include/c++/3.3.3/string:53,
from /usr/include/c++/3.3.3/stdexcept:45,
from cryptokiclass.h:5,
from slot.h:7,
from slot.cc:1:
/usr/include/c++/3.3.3/bits/basic_string.h: In member function `int
std::basic_string<_CharT, _Traits, _Alloc>::compare(const
std::basic_string<_CharT, _Traits, _Alloc>&) const':
/usr/include/c++/3.3.3/bits/basic_string.h:830: error: syntax error
before `;'
token
.... etc. etc.
If I remove the #include <map> line, they all go away. Any ideas as
to what I can do to fix this?
Thank you very much for your time.
Carl Youngblood