I am trying to compile the Boost-1.32.0 multi_array with CW-9.3 on
Windows XP. I was under the impression that the Boost libraries compiled
without problems on the latest versions to Codewarrior.
However, the following is a simple test program:
#include <boost/multi_array.hpp>
#include <iostream>
using namespace std;
using namespace boost;
int main() {
multi_array<float,3> f(extents[5][4][3]);
for (int N0 = 0; N0 < 5; N0++) {
for (int N1 = 0; N1 < 4; N1++) {
for (int N2 = 0; N2 < 3; N2++) {
f[N0][N1][N2] = 100*N2 + 10*N1 + N0;
cout << " " << f[N0][N1][N2];
}
cout << endl;
}
}
return 0;
}
results in numerous compile errors, mostly ambiguous overloaded function
accesses and denied access problems. For comparison, it compiles and
runs perfectly using Cygwin/g++.
I have tried everything that I could think of to get rid of the errors,
especially the "access denied", but nothing has worked so far. Is there
some magic Metrowerks incantation or configuration issue that I am
missing?
-----------------------------------------------------------------------
Error : ambiguous access to overloaded function
'std::strcmp(const char *, const char *)'
'std::strcmp(const char *, const char *)'
typeinfo line 229 fo& rhs) const {return
static_cast<bool>(strcmp(tname, rhs.tname) < 0);}
Error : ambiguous access to overloaded function
'std::strlen(const char *)'
'std::strlen(const char *)'
MSLstring.h line 59 : data_(new char [strlen(value)+1],
detail::apply_array_delete())
Error : ambiguous access to overloaded function
'std::strcpy(char *, const char *)'
'std::strcpy(char *, const char *)'
MSLstring.h line 61 (const_cast<char*>(static_cast<const
char*>(data_.get())), value);
Error : the file 'N:\Temp\TestArray\boost\algorithm\' cannot be opened
(Access is denied.)
(included from:
boost/multi_array/range_list.hpp:19
boost/multi_array/extent_gen.hpp:17
boost/multi_array/base.hpp:22
boost/multi_array.hpp:21
MultiArrayTest.cpp:1)
Error : ambiguous access to overloaded function
'std::memset(void *, int, unsigned int)'
'std::memset(void *, int, unsigned int)'
memory line 754 memset(first, x, static_cast<size_t>(last - first));
Error : ambiguous access to overloaded function
'std::memset(void *, int, unsigned int)'
'std::memset(void *, int, unsigned int)'
memory line 803 memset(first, x, n);
Error : the file 'N:\Temp\TestArray\boost\iterator\' cannot be opened
(Access is denied.)
(included from:
boost/multi_array/algorithm.hpp:43
boost/multi_array/storage_order.hpp:18
boost/multi_array/base.hpp:25
boost/multi_array.hpp:21
MultiArrayTest.cpp:1)
Error : the file 'N:\Temp\TestArray\boost\utility\' cannot be opened
(Access is denied.)
(included from:
boost/multi_array/collection_concept.hpp:16
boost/multi_array.hpp:22
MultiArrayTest.cpp:1)
Error : the file 'N:\Temp\TestArray\boost\numeric\' cannot be opened
(Access is denied.)


|