|
Using vector and list classed from STL in C++ program.
|
11/27/2024 9:25 AM
post122637
|
Using vector and list classed from STL in C++ program.
I am converting some code originally written for QNX 6.3.2 to run on QNX 7. The code makes use of the vector class, but
whenever <vector> is included I get the following warnings:
In file included from c:\qnx700\target\qnx7\usr\include\c++\v1\__bit_reference:17:0,
from c:\qnx700\target\qnx7\usr\include\c++\v1\vector:266,
from ../../common/core/src/SubsystemTranslator.h:62,
from ControlsManager.h:47,
from TXLXControls.h:51,
from TXLXControls.cpp:88:
c:\qnx700\target\qnx7\usr\include\c++\v1\__undef_min_max:16:2: error: #warning : macro min is incompatible with C++. #
undefing min [-Werror=cpp]
#warning: macro min is incompatible with C++. #undefing min
^
c:\qnx700\target\qnx7\usr\include\c++\v1\__undef_min_max:26:2: error: #warning : macro max is incompatible with C++. #
undefing max [-Werror=cpp]
#warning: macro max is incompatible with C++. #undefing max
If I comment out the #include <vector> line then the warning goes away. I really want to continue using the vector class
, mainly to be consistent with other projects, but I cannot do this as long as this warning keeps appearing. We are
treating all warnings as errors.
The odd thing is that almost identical code in another project compiles correctly without so much as a warning.
So is there a way to continue using the vector (and list) classes in a C++ project using the QNX 7 compiler? What do I
need to change?
|
|
|