
I get lots of warnings when I compile code using the logging library with g++ 4.1.3 with -W -Wall. I think they're all "class with virtual functions has non-virtual destructor", e.g. /usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp: In instantiation of ‘boost::logging::detail::default_cache_keeper<boost::logging::detail::cache_before_init<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >’: /usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp:126: instantiated from ‘boost::logging::logger_base<boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, boost::logging::default_, boost::logging::override>’ /usr/local/src/boost-logging/boost/logging/detail/logger.hpp:214: instantiated from ‘boost::logging::logger<boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, boost::logging::default_>’ Session.cc:203: instantiated from here /usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp:53: warning: ‘struct boost::logging::detail::default_cache_keeper<boost::logging::detail::cache_before_init<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >’ has virtual functions but non-virtual destructor /usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp: In instantiation of ‘boost::logging::logger_base<boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, boost::logging::default_, boost::logging::override>’: /usr/local/src/boost-logging/boost/logging/detail/logger.hpp:214: instantiated from ‘boost::logging::logger<boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, boost::logging::default_>’ Session.cc:203: instantiated from here /usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp:126: warning: ‘struct boost::logging::logger_base<boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, boost::logging::default_, boost::logging::override>’ has virtual functions but non-virtual destructor These are too verbose to ignore, even if they are harmless. Can they be fixed? Phil.

Hi Phil, Someone else told me privately about these - I fixed them but did not commit. However, I've committed the changes now - please take the latest version from SVN. Best, John
I get lots of warnings when I compile code using the logging library with g++ 4.1.3 with -W -Wall. I think they're all "class with virtual functions has non-virtual destructor", e.g.
-- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

John Torjo wrote:
Someone else told me privately about these - I fixed them but did not commit. However, I've committed the changes now - please take the latest version from SVN.
Done, thanks. Here's the next batch: unsigned vs. signed comparisons: /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp: In member function ‘void boost::logging::destination::detail::rolling_file_info<convert_dest>::restart() [with convert_dest = boost::logging::destination::do_convert_destination]’: /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp:85: instantiated from ‘boost::logging::destination::detail::rolling_file_info<convert_dest>::rolling_file_info(const std::string&, boost::logging::destination::rolling_file_settings) [with convert_dest = boost::logging::destination::do_convert_destination]’ /usr/local/src/boost-logging/boost/logging/detail/manipulator.hpp:494: instantiated from ‘boost::logging::manipulator::non_const_context<context_type>::non_const_context(const p1&, const p2&) [with p1 = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, p2 = boost::logging::destination::rolling_file_settings, context_type = boost::logging::destination::detail::rolling_file_info<boost::logging::destination::do_convert_destination>]’ /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp:179: instantiated from ‘boost::logging::destination::rolling_file_t<convert_dest>::rolling_file_t(const std::string&, boost::logging::destination::rolling_file_settings) [with convert_dest = boost::logging::destination::do_convert_destination]’ /usr/local/src/boost-logging/boost/logging/writer/named_write.hpp:356: instantiated from ‘void boost::logging::writer::named_write<format_write_>::init() [with format_write_ = boost::logging::default_]’ /usr/local/src/boost-logging/boost/logging/writer/named_write.hpp:153: instantiated from ‘boost::logging::writer::named_write<format_write_>::named_write() [with format_write_ = boost::logging::default_]’ /usr/local/src/boost-logging/boost/logging/detail/logger.hpp:224: instantiated from ‘boost::logging::logger<gather_msg, write_msg>::logger() [with gather_msg = boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, write_msg = boost::logging::writer::named_write<boost::logging::default_>]’ /usr/local/src/boost-logging/boost/logging/detail/log_keeper.hpp:89: instantiated from ‘boost::logging::logger_holder_by_value<type>::logger_holder_by_value() [with type = boost::logging::logger<boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, boost::logging::writer::named_write<boost::logging::default_> >]’ log.cc:6: instantiated from here /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp:101: warning: comparison between signed and unsigned integer expressions /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp: In member function ‘void boost::logging::destination::detail::rolling_file_info<convert_dest>::recreate_file() [with convert_dest = boost::logging::destination::do_convert_destination]’: /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp:114: instantiated from ‘void boost::logging::destination::detail::rolling_file_info<convert_dest>::restart() [with convert_dest = boost::logging::destination::do_convert_destination]’ /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp:85: instantiated from ‘boost::logging::destination::detail::rolling_file_info<convert_dest>::rolling_file_info(const std::string&, boost::logging::destination::rolling_file_settings) [with convert_dest = boost::logging::destination::do_convert_destination]’ /usr/local/src/boost-logging/boost/logging/detail/manipulator.hpp:494: instantiated from ‘boost::logging::manipulator::non_const_context<context_type>::non_const_context(const p1&, const p2&) [with p1 = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, p2 = boost::logging::destination::rolling_file_settings, context_type = boost::logging::destination::detail::rolling_file_info<boost::logging::destination::do_convert_destination>]’ /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp:179: instantiated from ‘boost::logging::destination::rolling_file_t<convert_dest>::rolling_file_t(const std::string&, boost::logging::destination::rolling_file_settings) [with convert_dest = boost::logging::destination::do_convert_destination]’ /usr/local/src/boost-logging/boost/logging/writer/named_write.hpp:356: instantiated from ‘void boost::logging::writer::named_write<format_write_>::init() [with format_write_ = boost::logging::default_]’ /usr/local/src/boost-logging/boost/logging/writer/named_write.hpp:153: instantiated from ‘boost::logging::writer::named_write<format_write_>::named_write() [with format_write_ = boost::logging::default_]’ /usr/local/src/boost-logging/boost/logging/detail/logger.hpp:224: instantiated from ‘boost::logging::logger<gather_msg, write_msg>::logger() [with gather_msg = boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, write_msg = boost::logging::writer::named_write<boost::logging::default_>]’ /usr/local/src/boost-logging/boost/logging/detail/log_keeper.hpp:89: instantiated from ‘boost::logging::logger_holder_by_value<type>::logger_holder_by_value() [with type = boost::logging::logger<boost::logging::gather::ostream_like::return_str<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > >, boost::logging::writer::named_write<boost::logging::default_> >]’ log.cc:6: instantiated from here /usr/local/src/boost-logging/boost/logging/format/destination/rolling_file.hpp:131: warning: comparison between signed and unsigned integer expressions Phil.

On Fri, Feb 08, 2008 at 04:31:39PM +0000, Phil Endecott wrote:
John Torjo wrote:
Someone else told me privately about these - I fixed them but did not commit. However, I've committed the changes now - please take the latest version from SVN.
Done, thanks. Here's the next batch: unsigned vs. signed comparisons:
John, please try to test your code before you commit. There are even some errors in namespaces which cause trouble during compilation. I attached a trivial patch. I tested beside header files using my check_boost script also all *.cpp files using for i in $(find -name "*.cpp"); do /usr/lib/gcc-snapshot/bin/g++ -Wall -O3 -Wno-long-long -W -pedantic -I /home/jens/Programme/Entwicklung/Boost/svn/logging/ -I /home/jens/Programme/Entwicklung/Boost/svn/trunk/ $i -c -o /tmp/test.o; done | tee /tmp/log and got the attached output. You can probably indeed not fix all warnings such as warning: type qualifiers ignored on function return type which results from code like: template<class T> T function(T) { return T() } with T = const char. Changing the return value from const char to char would fix this problem. Also look at /usr/lib/gcc-snapshot/lib/gcc/i486-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h: In function 'char* boost::debug::<unnamed>::prepare_window_title(const boost::debug::dbg_startup_info&)': /usr/lib/gcc-snapshot/lib/gcc/i486-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:202: warning: array subscript is above array bounds It's somewhere in Boost.Test but since snprintf is properly used I don't understand the warning. PS: Please wrap your lines. Parts of the patch will be unreadable for you because some lines are just too long. Jens

Jens Seidel wrote:
On Fri, Feb 08, 2008 at 04:31:39PM +0000, Phil Endecott wrote:
John Torjo wrote:
Someone else told me privately about these - I fixed them but did not commit. However, I've committed the changes now - please take the latest version
from SVN.
Done, thanks. Here's the next batch: unsigned vs. signed comparisons:
John, please try to test your code before you commit. There are even some
I always do that - unfortunately MSVC did not complain. gcc did not complain either. I've just added -W -Wall so that I catch all these "cool" warnings. p.s. sorry about syslog - did not test it since I don't have linux. Here's the latest compilation: Compiler: gcc 4.1 Building Makefile: "D:\john\code\boost_sandbox\logging\libs\logging\internal\gcc\Makefile.win" Executing make... make.exe -f "D:\john\code\boost_sandbox\logging\libs\logging\internal\gcc\Makefile.win" all g++.exe -c main.cpp -o main.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/one_loger_one_filter.cpp -o ../../samples/scenarios/one_loger_one_filter.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/custom_fmt_dest.cpp -o ../../samples/scenarios/custom_fmt_dest.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/fastest_no_ostr_like.cpp -o ../../samples/scenarios/fastest_no_ostr_like.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/fastest_use_ostr_like.cpp -o ../../samples/scenarios/fastest_use_ostr_like.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/mul_levels_mul_logers.cpp -o ../../samples/scenarios/mul_levels_mul_logers.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/mul_levels_one_logger.cpp -o ../../samples/scenarios/mul_levels_one_logger.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/mul_loggers_one_filter.cpp -o ../../samples/scenarios/mul_loggers_one_filter.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/no_levels_with_route.cpp -o ../../samples/scenarios/no_levels_with_route.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/your_scenario.cpp -o ../../samples/scenarios/your_scenario.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/ded_loger_one_filter.cpp -o ../../samples/scenarios/ded_loger_one_filter.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/ts_loger_one_filter.cpp -o ../../samples/scenarios/ts_loger_one_filter.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/using_tags.cpp -o ../../samples/scenarios/using_tags.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall g++.exe -c ../../samples/scenarios/use_tss_ostringstream.cpp -o ../../samples/scenarios/use_tss_ostringstream.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall
errors in namespaces which cause trouble during compilation. I attached a trivial patch.
I tested beside header files using my check_boost script also all *.cpp files using
for i in $(find -name "*.cpp"); do /usr/lib/gcc-snapshot/bin/g++ -Wall -O3 -Wno-long-long -W -pedantic -I /home/jens/Programme/Entwicklung/Boost/svn/logging/ -I /home/jens/Programme/Entwicklung/Boost/svn/trunk/ $i -c -o /tmp/test.o; done | tee /tmp/log
and got the attached output. You can probably indeed not fix all warnings such as
warning: type qualifiers ignored on function return type
which results from code like: template<class T> T function(T) { return T() }
I'll look at it
with T = const char. Changing the return value from const char to char would fix this problem.
Also look at
/usr/lib/gcc-snapshot/lib/gcc/i486-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h: In function 'char* boost::debug::<unnamed>::prepare_window_title(const boost::debug::dbg_startup_info&)': /usr/lib/gcc-snapshot/lib/gcc/i486-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:202: warning: array subscript is above array bounds
It's somewhere in Boost.Test but since snprintf is properly used I don't understand the warning.
I'll look at it
PS: Please wrap your lines. Parts of the patch will be unreadable for you because some lines are just too long.
The patch was just fine ;) Best, John
Jens
------------------------------------------------------------------------
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

On Fri, Feb 08, 2008 at 07:24:21PM +0200, John Torjo wrote:
Jens Seidel wrote:
John, please try to test your code before you commit. There are even some
I always do that - unfortunately MSVC did not complain. gcc did not complain either. I've just added -W -Wall so that I catch all these "cool" warnings.
OK, but you probably test not all files. Have you tried my simple boost_check script or did you wrote a own script to test *all* files? It's hard for me to believe that you can use wrong namespaces, include non-existing files, ... Maybe the compiler will indeed not complain if the code is not instanciated, don't know. PS: How about a mini Linux system in a virtual environment? There are much more possibilities to create such an environment in Linux (chroot, UML, qemu, xen, bochs, and many many more) but there should be a solution also for your system. PS2: Whouldn't it a good idea if Boost could allow developer access to a Linux server? I strongly assume that e.g. the web pages are self hosted on a Open Source platform.
p.s. sorry about syslog - did not test it since I don't have linux.
No problem. It is really great that you nevertheless support it.
Here's the latest compilation:
Compiler: gcc 4.1 Building Makefile: "D:\john\code\boost_sandbox\logging\libs\logging\internal\gcc\Makefile.win" Executing make... make.exe -f "D:\john\code\boost_sandbox\logging\libs\logging\internal\gcc\Makefile.win" all g++.exe -c main.cpp -o main.o -I".." -I"D:/boosts/boost_1_33_1" -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" -I"." -I"../../../.." -W -Wall
Mmh, I assume it is jam stuff which I never used myself. I wonder about -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" shouldn't it be in the default compiler search path? Maybe you should also add -pedantic (and -Wno-long-long if it complains about long long?). Jens

OK, but you probably test not all files. Have you tried my simple boost_check script or did you wrote a own script to test *all* files?
From what I see, that script is Linux-only ;)
PS: How about a mini Linux system in a virtual environment? There are much more possibilities to create such an environment in Linux (chroot, UML, qemu, xen, bochs, and many many more) but there should be a solution also for your system.
Most likely that's what I'll do - a linux system on a vmware.
PS2: Whouldn't it a good idea if Boost could allow developer access to a Linux server? I strongly assume that e.g. the web pages are self hosted on a Open Source platform.
That would be great!
Mmh, I assume it is jam stuff which I never used myself. I wonder about -I"C:/mingw/include/c++/4.1.2/backward" -I"C:/mingw/include/c++/4.1.2" -I"C:/mingw/include/c++" -I"C:/mingw/include" shouldn't it be in the default compiler search path?
This is generated from Dev-c++
Maybe you should also add -pedantic (and -Wno-long-long if it complains about long long?).
Ok I will. Best, John -- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

AMDG John Torjo wrote:
OK, but you probably test not all files. Have you tried my simple boost_check script or did you wrote a own script to test *all* files?
From what I see, that script is Linux-only ;)
Here's a bjam version that I use in the main boost directory. In Christ, Steven Watanabe

Steven Watanabe wrote:
AMDG
John Torjo wrote:
OK, but you probably test not all files. Have you tried my simple boost_check script or did you wrote a own script to test *all* files?
From what I see, that script is Linux-only ;)
Here's a bjam version that I use in the main boost directory.
Thanks, I'll do my best to use it in the future. Did I mention I HATE bjam? Best, John -- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

On Sat, Feb 09, 2008 at 07:20:19PM +0200, John Torjo wrote:
OK, but you probably test not all files. Have you tried my simple boost_check script or did you wrote a own script to test *all* files?
From what I see, that script is Linux-only ;)
Not Linux, POSIX, will work on *BSD, GNU/Hurd, ... as well :-) Since you have gcc available I assume you use cygwin. Just install the bash shell via it and start the script from it. I would really wonder if you do not know about it. How would you otherwise call perl or perform other simple and trivial stuff (such as replacing a string in a file)? By installing each little program from scratch or writing a C++ replacement program? In short: Try cygwin or even better switch your whole system :-)) Jens

Jens Seidel wrote:
On Sat, Feb 09, 2008 at 07:20:19PM +0200, John Torjo wrote:
OK, but you probably test not all files. Have you tried my simple boost_check script or did you wrote a own script to test *all* files?
From what I see, that script is Linux-only ;)
Not Linux, POSIX, will work on *BSD, GNU/Hurd, ... as well :-)
Since you have gcc available I assume you use cygwin. Just install the
I use mingw
bash shell via it and start the script from it. I would really wonder if you do not know about it. How would you otherwise call perl or perform other simple and trivial stuff (such as replacing a string in a file)? By installing each little program from scratch or writing a C++
Replacing string in a file? The VS2005 IDE :)
replacement program?
In short: Try cygwin or even better switch your whole system :-))
I'm a Windows kind of guy ;) When I'll have a decent debugger on Linux (gdb on a scale from 1 to 10 , gets 1; ddd on a scale from 1 to 10, gets 3.5), I might consider having a dual boot. Until then... Best, John -- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

John Torjo wrote:
I'm a Windows kind of guy ;) When I'll have a decent debugger on Linux (gdb on a scale from 1 to 10 , gets 1; ddd on a scale from 1 to 10, gets 3.5), I might consider having a dual boot. Until then...
You should try something you are accustomed with, to alleviate the pain. It's called Visual SlickEdit with Visual Studio keybindings (http://www.slickedit.com) Regards, Cristi.

Cristian Adam wrote:
John Torjo wrote:
I'm a Windows kind of guy ;) When I'll have a decent debugger on Linux (gdb on a scale from 1 to 10 , gets 1; ddd on a scale from 1 to 10, gets 3.5), I might consider having a dual boot. Until then...
You should try something you are accustomed with, to alleviate the pain. It's called Visual SlickEdit with Visual Studio keybindings (http://www.slickedit.com)
Sounds pretty cool. But by looking at the site, it looks to be just an editor. I see nothing about a debugger... Best, John -- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

John Torjo skrev:
I'm a Windows kind of guy ;) When I'll have a decent debugger on Linux (gdb on a scale from 1 to 10 , gets 1; ddd on a scale from 1 to 10, gets 3.5), I might consider having a dual boot. Until then... Well download one, it is free :-)
Has anybody on the list tried the SunStudio support for Linux on x86 and its tools support for GCC in addition to Sun CC? I know the dbx debugger to be very good, in many areas it used to be far superior to MS VisualStudio's debugger. The GUI was not as nice as VisualStudio but far better than DDD. Now Sun provide compiler and tools for free if you join SDN (also free I think). GUI is now Net.Beans (free again) which looks very nice, I have not tried it. http://developers.sun.com/sunstudio/downloads/index.jsp -- Bjørn

Bjørn Roald wrote:
Has anybody on the list tried the SunStudio support for Linux on x86 and its tools support for GCC in addition to Sun CC? I know the dbx debugger to be very good, in many areas it used to be far superior to MS VisualStudio's debugger. The GUI was not as nice as VisualStudio but far better than DDD. Now Sun provide compiler and tools for free if you join SDN (also free I think). GUI is now Net.Beans (free again) which looks very nice, I have not tried it.
I found this page: http://developers.sun.com/sunstudio/documentation/ss12/mr/READMEs/dbx.html#l... It seems to be some limitations with dbx on Linux and with g++ compiled binaries. :-( The most serious limitation in my view is: * Run-time type information for C++ expressions is not available for programs compiled with the g++ compiler. -- Bjørn

How about M-x gdb with (setq gdb-many-windows t) (setq gdb-use-separate-io-buffer t) in .emacs.el http://www.emacswiki.org/cgi-bin/wiki/GrandUnifiedDebugger

Niitsuma Hirotaka skrev:
How about M-x gdb with (setq gdb-many-windows t) (setq gdb-use-separate-io-buffer t) in .emacs.el
I will try those options.
I would not recomend gud/gdb for debugging to people not using or determined to start using Emacs. I think you should have other reasons to start using Emacs than the debugger support. Sure, for those that use emacs, gud/gdb is an option. GUD even support multipple debugger back-ends. In the new GNU Emacs 22.x the GUD user interface has improved a lot, more tempting but I am still not convinced. I am not a gud/gdb fan, even though I use emacs as often I can :-) I have tried to get used to using gud/gdb a few times as it integrate better with my favorit editor than other debuggers. Problem is I know all too well how to do my debugging in VisualStudio and SunStudio, so it is a frustrating exercise to learn a new debugger user interface when I am not forced to. In Linux, I have to say I debug as little as I can, I try to get things working on Solaris with Sun tools and in Windows with MS tools, then beg for it to work on Linux as well. I may try some other tools on Linux next time I am forced to do serious debugging on that platform. I really only need to know how to use one debugger GUI if it only could work on all platforms :-) -- Bjørn

On Sun, Feb 10, 2008 at 04:17:58AM +0200, John Torjo wrote:
Jens Seidel wrote:
On Sat, Feb 09, 2008 at 07:20:19PM +0200, John Torjo wrote:
OK, but you probably test not all files. Have you tried my simple boost_check script or did you wrote a own script to test *all* files?
Since you have gcc available I assume you use cygwin. Just install the
I use mingw
I always have trouble understanding the fine differences between Cygwin's gcc (uses probably pristine gcc source with Cygwin's POSIX layer) and mingw (a real port to Windows?). I really wonder why porting attempts to Windows are not already part of gcc source ...
Replacing string in a file? The VS2005 IDE :)
And via script?
I'm a Windows kind of guy ;) When I'll have a decent debugger on Linux (gdb on a scale from 1 to 10 , gets 1; ddd on a scale from 1 to 10, gets 3.5), I might consider having a dual boot. Until then...
I use gdb's command line interface and understand you :-) I suggest you try out Eclipse together with the CDT (C/C++) module. CDT 4.0 made a big progress, it is fully graphical, cross platform, ... IDE. It's really great. It doesn't always work properly with a free Java implementation as found in many Linux distributions but now that Java is relicensed to GPL there will be a lot of progress. The last time I indexed Boost trunk I got only a single parser exception (which I reported of course). So jumping to a definition of a class, and other code navigation works quite good (but not yet perfect). Jens

Hi Jens,
I always have trouble understanding the fine differences between Cygwin's gcc (uses probably pristine gcc source with Cygwin's POSIX layer) and mingw (a real port to Windows?). I really wonder why porting attempts to Windows are not already part of gcc source ...
Beats me :)
Replacing string in a file? The VS2005 IDE :)
And via script?
No need - from the VS2005 IDE I can do find/replace for anything.
I'm a Windows kind of guy ;) When I'll have a decent debugger on Linux (gdb on a scale from 1 to 10 , gets 1; ddd on a scale from 1 to 10, gets 3.5), I might consider having a dual boot. Until then...
I use gdb's command line interface and understand you :-) I suggest you try out Eclipse together with the CDT (C/C++) module. CDT 4.0 made a big progress, it is fully graphical, cross platform, ... IDE. It's really great. It doesn't always work properly with a free Java implementation as found in many Linux distributions but now that Java is relicensed to GPL there will be a lot of progress.
The last time I indexed Boost trunk I got only a single parser exception (which I reported of course). So jumping to a definition of a class, and other code navigation works quite good (but not yet perfect).
I don't have too much of a problem with editors, my true problem is a debugger. The gdb is sooooo bad, that the info I get from it is just useless. So I end up doing logging and stuff. And it's kind of funny to do logging to debug a logging library :) Best, John -- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

John Torjo wrote:
Hi Jens,
I use gdb's command line interface and understand you :-) I suggest you try out Eclipse together with the CDT (C/C++) module.
I find Eclipse too big and slow for my taste. gdb is terrible. For debugging on Linux, I use the Zero debugger: http://www.zero-bugs.com/ -- Eric Niebler Boost Consulting www.boost-consulting.com

Am Sonntag 10 Februar 2008 18:15:05 schrieb Eric Niebler:
John Torjo wrote:
Hi Jens,
I use gdb's command line interface and understand you :-) I suggest you try out Eclipse together with the CDT (C/C++) module.
I find Eclipse too big and slow for my taste. gdb is terrible. For debugging on Linux, I use the Zero debugger: http://www.zero-bugs.com/
Hello Eric I'm using Eclipse every Day and it can be very fast. The trick is to alter the eclipse.ini file (same folder as eclipse.exe). The default one is ok for the java stuff and little C/C++ projects, but for the major ones like boost and KDE java runs out of memory which make eclipse slow or even crash. This is the content of my eclipse.ini -showsplash org.eclipse.platform -vmargs -XX:PermSize=256m -XX:MaxPermSize=256m -Xms1024m -Xmx1024m which makes eclipse fast as lightning on my 64Bit Linux, 4GB Ram, E6600 Box. Best, -- Maik

On Sun, Feb 10, 2008 at 06:32:51PM +0200, John Torjo wrote:
I use gdb's command line interface and understand you :-) I suggest you try out Eclipse together with the CDT (C/C++) module. CDT 4.0 made a big progress, it is fully graphical, cross platform, ... IDE. It's really great. It doesn't always work properly with a free Java implementation as found in many Linux distributions but now that Java is relicensed to GPL there will be a lot of progress.
The last time I indexed Boost trunk I got only a single parser exception (which I reported of course). So jumping to a definition of a class, and other code navigation works quite good (but not yet perfect).
I don't have too much of a problem with editors, my true problem is a debugger. The gdb is sooooo bad, that the info I get from it is just useless. So I end up doing logging and stuff.
Eclipse contains a good graphical debugger based on gdb. I'm really sure it is what you want! Try it out on Windows! (There are always some issues on Windows if e.g. Cygwin is used because a path<-->drive letter mapping needs to be specified. Don't know about mingw. It works out of the box on Linux.) The current version is also much faster as older ones. Whereas older CDT module could easily require 30 minutes (or even more) to index Boost the current version is able to do this in approximetely 1 minute. PS: There are also many other IDE with good debuggers: KDE's kdevelop, GNOME's ??? (forgot the name, but I remember that I translated it) something as IDE:blocks? Look at packages.debian.org for some other IDEs ... PS2: Yep I know it becomes off-topic for this list ... Jens

I don't have too much of a problem with editors, my true problem is a debugger. The gdb is sooooo bad, that the info I get from it is just useless. So I end up doing logging and stuff.
Eclipse contains a good graphical debugger based on gdb. I'm really sure it is what you want! Try it out on Windows! (There are always some issues on Windows if e.g. Cygwin is used because a path<-->drive letter mapping needs to be specified. Don't know about mingw. It works out of the box on Linux.)
Might give it a try... I guess it would be useless to try it on a vmware image, right?
PS: There are also many other IDE with good debuggers: KDE's kdevelop,
Last time i used it, it was bad. Hope it improved. Best, John -- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

On Sun, Feb 10, 2008 at 05:11:46PM +0100, Jens Seidel wrote:
I always have trouble understanding the fine differences between Cygwin's gcc (uses probably pristine gcc source with Cygwin's POSIX layer) and mingw (a real port to Windows?). I really wonder why porting attempts to Windows are not already part of gcc source ...
MinGW includes a runtime environment as well as the compiler. That's outside the scope of GCC. GCC on cygwin relies on the cygwin-provided libc, which is a POSIXy runtime environment, not a Windowsy one like MinGW's. So there's nothing that could be included in the GCC source - the choice of runtime (cygwin, djgpp, mingw, whatever) is external to the compiler.
Replacing string in a file? The VS2005 IDE :)
And via script?
The Windows kind of guys I know don't do scripts. Incredible I know ;)
I'm a Windows kind of guy ;) When I'll have a decent debugger on Linux (gdb on a scale from 1 to 10 , gets 1; ddd on a scale from 1 to 10, gets 3.5), I might consider having a dual boot.
Personally I'd swap those numbers, I'd rather have no GUI than DDD's. Jon

Replacing string in a file? The VS2005 IDE :)
And via script?
The Windows kind of guys I know don't do scripts. Incredible I know ;)
You kind of got that right :) I don't have anything against scripts, it's just that I'm tired of remembering all those command line args... Best, John -- http://John.Torjo.com -- C++ expert http://blog.torjo.com ... call me only if you want things done right

Jens Seidel wrote:
I use gdb's command line interface and understand you :-) I suggest you try out Eclipse together with the CDT (C/C++) module. CDT 4.0 made a big progress, it is fully graphical, cross platform, ... IDE. It's really great. It doesn't always work properly with a free Java implementation as found in many Linux distributions but now that Java is relicensed to GPL there will be a lot of progress.
Two things, Last time I looked Eclipse did not support relative paths (seriously, I also recall this was a 'feature') rendering it unusable for any of the projects I was involved in - YMMV There is an IDE with a reasonable debugger UI for gdb in CodeBlocks which is worth a try (it's even written in C++). It is in the spirit of C++BuilderX if anyone remembers that IDE. I use CB now as my main IDE even on Windows, though for debugging on Windows VC++ is a clear winner. Apologies for being drawn into this OT thread... ;) Jamie

Jens Seidel <jensseidel <at> users.sf.net> writes:
On Fri, Feb 08, 2008 at 04:31:39PM +0000, Phil Endecott wrote:
John Torjo wrote:
Someone else told me privately about these - I fixed them but did not commit. However, I've committed the changes now - please take the latest version from SVN.
Done, thanks. Here's the next batch: unsigned vs. signed comparisons:
John, please try to test your code before you commit. There are even some errors in namespaces which cause trouble during compilation. I attached a trivial patch.
Even better, postpone any updates till after review. The only version that is officially being discussed is the one in submission package. Gennadiy -Review Manager-
participants (12)
-
Bjørn Roald
-
Cristian Adam
-
Eric Niebler
-
Gennadiy Rozental
-
Jamie Allsop
-
Jens Seidel
-
John Torjo
-
Jonathan Wakely
-
Maik Beckmann
-
Niitsuma Hirotaka
-
Phil Endecott
-
Steven Watanabe