
When compling the bench* tests for ublas using the jamfiles, both cwpro8 and
borland do not seem to know about the function rand(). I think that

Hi Benedikt, you wrote:
When compling the bench* tests for ublas using the jamfiles, both cwpro8 and borland do not seem to know about the function rand().
Changed to std::rand() in my local copy (seems like I've been programming too much C in the past ;-)
I think that
should be included somewhere. MSVC seems to do this implicitely.
And yes, <cstdlib> is included somewhere deep in ublas.
Furthermore, only debug versions are generated for all tests (test* and bench*).
What about bjam -sBUILD="release" ? Thanks, Joerg

Hi Joerg jhr.walter@t-online.de wrote:
Changed to std::rand() in my local copy (seems like I've been programming too much C in the past ;-)
And don't forget atoi() in rand1.cpp, rand2.cpp, rand3.cpp, rand4.cpp
What about bjam -sBUILD="release" ?
Yes, that works fine. Sorry I just started to use bjam and only used the
default cases. I noticed that other libraries build debug and release by
default. So I expected the same from ublas.
Now I have a more serios problem. Codewarrior (cwpro8) has problems when
decrementing iterators in several places. I just give you 2 examples, others
are similar. (I can mail you all the long error messages if necessary)
Benedikt
### mwcc Compiler:
# In: ..\..\..\boost\numeric\ublas\iterator.hpp
# From: test2\test23.cpp
# -------------------------
# 846: return tmp -= n;
# Error: ^
# illegal implicit conversion from
'std::reverse_iterator

Hi Benedikt, you wrote:
Changed to std::rand() in my local copy (seems like I've been programming too much C in the past ;-)
And don't forget atoi() in rand1.cpp, rand2.cpp, rand3.cpp, rand4.cpp
Those are not mine ;-) But I see, what you mean (and fixed it).
What about bjam -sBUILD="release" ?
Yes, that works fine. Sorry I just started to use bjam and only used the default cases. I noticed that other libraries build debug and release by default. So I expected the same from ublas.
There's one difference: they build libraries. We only build tests.
Now I have a more serios problem. Codewarrior (cwpro8) has problems when decrementing iterators in several places. I just give you 2 examples, others are similar. (I can mail you all the long error messages if necessary)
The diagnostics reference the following code ---------- #ifndef BOOST_UBLAS_NO_MEMBER_FRIENDS friend reverse_iterator_base1 operator + (const reverse_iterator_base1 &it, difference_type n) { reverse_iterator_base1 tmp (it); return tmp += n; } friend reverse_iterator_base1 operator - (const reverse_iterator_base1 &it, difference_type n) { reverse_iterator_base1 tmp (it); return tmp -= n; } friend difference_type operator - (const reverse_iterator_base1 &it1, const reverse_iterator_base1 &it2) { return it2.base () - it1.base (); } #endif ---------- It would be great, if you could give #define BOOST_UBLAS_NO_MEMBER_FRIENDS a try. I've probably changed the default in the past. Thanks, Joerg [snip]

Hi Joerg The tests work fine with #define BOOST_UBLAS_NO_MEMBER_FRIENDS I just used: set TOOLS=cwpro8 bjam "-sBUILD=<define>BOOST_UBLAS_NO_MEMBER_FRIENDS" I am not sure though how to put this into the jamfile. I noticed that you put the same jam features into all subprojects. Could the common setting be factored out? I also don't understand why you have set features (turn off some warnings) for test1 only but not for test11, test12, test13. Benedikt jhr.walter@t-online.de wrote:
Hi Benedikt,
you wrote:
Now I have a more serios problem. Codewarrior (cwpro8) has problems when decrementing iterators in several places. I just give you 2 examples, others are similar. (I can mail you all the long error messages if necessary)
The diagnostics reference the following code
---------- #ifndef BOOST_UBLAS_NO_MEMBER_FRIENDS friend reverse_iterator_base1 operator + (const reverse_iterator_base1 &it, difference_type n) { reverse_iterator_base1 tmp (it); return tmp += n; } friend reverse_iterator_base1 operator - (const reverse_iterator_base1 &it, difference_type n) { reverse_iterator_base1 tmp (it); return tmp -= n; } friend difference_type operator - (const reverse_iterator_base1 &it1, const reverse_iterator_base1 &it2) { return it2.base () - it1.base (); } #endif ----------
It would be great, if you could give
#define BOOST_UBLAS_NO_MEMBER_FRIENDS
a try. I've probably changed the default in the past.
Thanks,
Joerg

Hi Benedikt, you wrote:
The tests work fine with
#define BOOST_UBLAS_NO_MEMBER_FRIENDS
Thanks for checking.
I just used:
set TOOLS=cwpro8 bjam "-sBUILD=<define>BOOST_UBLAS_NO_MEMBER_FRIENDS"
I am not sure though how to put this into the jamfile.
It would probably be better to add a Metrowerks configuration to ublas' config.hpp. I've already changed the start of it in my local copy to ---------- // Compiler specific problems: default configuration #if defined (BOOST_STRICT_CONFIG) || ! (\ defined (BOOST_MSVC) || \ defined (__GNUC__) || \ defined (__BORLANDC__) || \ defined (_ICL) || \ defined (_ICC) || \ defined (__COMO__) || \ defined (__MWERKS__)) ... #endif ---------- and added ---------- // Metrowerks Codewarrior #if defined (__MWERKS__) && ! defined (BOOST_STRICT_CONFIG) #define BOOST_UBLAS_TYPENAME typename #define BOOST_UBLAS_USING using #define BOOST_UBLAS_EXPLICIT explicit #define BOOST_UBLAS_USE_LONG_DOUBLE #define BOOST_UBLAS_USE_STREAM #define BOOST_UBLAS_NO_MEMBER_FRIENDS #endif ----------
I noticed that you put the same jam features into all subprojects. Could the common setting be factored out?
Probably. I've never put too much effort into the adoption of the build system, because ublas is header only from a user perspective.
I also don't understand why you have set features (turn off some warnings) for test1 only but not for test11, test12, test13.
That's surprising. I'll look into it. Thanks, Joerg

Hi Joerg jhr.walter@t-online.de wrote:
Hi Benedikt,
I've already changed the start of it in my local copy to
---------- // Compiler specific problems: default configuration #if defined (BOOST_STRICT_CONFIG) || ! (\ defined (BOOST_MSVC) || \ defined (__GNUC__) || \ defined (__BORLANDC__) || \ defined (_ICL) || \ defined (_ICC) || \ defined (__COMO__) || \ defined (__MWERKS__)) ... #endif ----------
and added
---------- // Metrowerks Codewarrior #if defined (__MWERKS__) && ! defined (BOOST_STRICT_CONFIG)
#define BOOST_UBLAS_TYPENAME typename #define BOOST_UBLAS_USING using #define BOOST_UBLAS_EXPLICIT explicit
#define BOOST_UBLAS_USE_LONG_DOUBLE
#define BOOST_UBLAS_USE_STREAM
#define BOOST_UBLAS_NO_MEMBER_FRIENDS
#endif ----------
Works fine, thanks!
I've never put too much effort into the adoption of the build system, because ublas is header only from a user perspective.
You are right! The reason I was drifted towards bjam was because I was actually trying to understand bjam, so I could use it for an other project. Testing ublas was only a byproduct ;-). This does not mean that I am not interested in ublas. I still hope to use it one day in a project. In the meantime I am following the posts on the ublas-dev group at Yahoo. Benedikt
participants (3)
-
Benedikt Weber
-
jhr.walter@t-online.de
-
Zdenek Hurak