to_simple_string and Windows?
Hi. I have used the boost::date_time library in Linux with no problems, but the same can not be said of my experience with it in Windows... My current pain in Windows is with the "to_simple_string" method used to convert a boost::date_time value to guess what, a string. This works fine in Linux, but not in stupid Windows. The following line just borks: std::cout << to_simple_string(date(2003,4,30)) << std::endl; Any little unknown configuration tricks etc. I need to be aware of here? Has anyone used the "to_simple_string" method without problems in Windows? I'll appreciate any help in this regard. Greetings, A. [Non-text portions of this message have been removed]
Hi.
I have used the boost::date_time library in Linux with no problems, but
Darn; here I go replying to my own post again...
Anyway; so far I have narrowed the problem down to one of optimisation. I
did a debug compilation and had no problem. A moment of reflection led me
to the conclusion that optimisation might have something to do with it. For
the record; I am using Boost in Windows, with Visual Studio as IDE only, and
the Intel 7.0 compiler. Oh; and STLport instead of Windows' crappy STL
implementation.
I.e. turning on "Maximise speed" optimisation causes "to_simple_string" to
fail on my build system.
I'll try to setup the simplest proggie I can to illustrate this problem.
Any thoughts?
Greetings,
A.
----- Original Message -----
From: "adutoit"
My current pain in Windows is with the "to_simple_string" method used to
convert a boost::date_time value to guess what, a string. This works fine in Linux, but not in stupid Windows.
The following line just borks:
std::cout << to_simple_string(date(2003,4,30)) << std::endl;
Any little unknown configuration tricks etc. I need to be aware of here?
Has anyone used the "to_simple_string" method without problems in Windows?
I'll appreciate any help in this regard.
Greetings, A.
[Non-text portions of this message have been removed]
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Darn; here I go replying to my own post again... Anyway; so far I have narrowed the problem down to one of optimisation. I did a debug compilation and had no problem. A moment of reflection led me to the conclusion that optimisation might have something to do with it. For the record; I am using Boost in Windows, with Visual Studio as IDE only, and the Intel 7.0 compiler. Oh; and STLport instead of Windows' crappy STL implementation.
I.e. turning on "Maximise speed" optimisation causes "to_simple_string" to fail on my build system.
I'll try to setup the simplest proggie I can to illustrate this problem.
Any thoughts?
I'm not aware of anyone else having a problem. Perhaps you can post the details of the compilation failure? Jeff
It is not a compile-time error, but rather a run-time error.
Ie. if I compile any program which utilises boost::to_simple_string with any
optimisation whatsoever; it simply aborts at the point where I do my
function call to "to_simple_string". That is irrespective of my using a
type date or ptime as the function argument...
I must stress again that "to_simple_string" works fine when I compile it in
Linux.
O, another question I have. Where do I disable Unicode support (wchar_t
usage in fact!) alltogether for Boost?
Previously I had great fun with lexical_cast.hpp which utilised wchar_t
versions of some of the streaming operators because I had a silly UNICODE
define as part of my project options. The solution was to use /Zc:wchar_t
project option in M$VC6.
But UNICODE defined caused problems in network browsing code I used which
`normally' returned a LPSTR instead of the LPWSTR if UNICODE is defined.
Long story. I did a temp hack in lexical_cast.hpp by
# define DISABLE_WIDE_CHAR_SUPPORT
#undef BOOST_NO_INTRINSIC_WCHAR_T
and getting rid of the redefinition of BOOST_NO_INTRINSIC_WCHAR_T.
Now is there a way to do this cleanly, compile-time so that I do not need to
keep on hacking the source code?
Greetings,
Andre.
----- Original Message -----
From: "Jeff Garland"
Darn; here I go replying to my own post again... Anyway; so far I have narrowed the problem down to one of optimisation. I did a debug compilation and had no problem. A moment of reflection led me to the conclusion that optimisation might have something to do with it. For the record; I am using Boost in Windows, with Visual Studio as IDE only, and the Intel 7.0 compiler. Oh; and STLport instead of Windows' crappy STL implementation.
I.e. turning on "Maximise speed" optimisation causes "to_simple_string" to fail on my build system.
I'll try to setup the simplest proggie I can to illustrate this problem.
Any thoughts?
I'm not aware of anyone else having a problem. Perhaps you can post the details of the compilation failure?
Jeff
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (2)
-
adutoit
-
Jeff Garland