Opened 15 years ago

Closed 14 years ago

#1542 closed Bugs (fixed)

[test] compiler errors when building with stdcxx library

Reported by: faridz@… Owned by: Gennadiy Rozental
Milestone: Boost 1.36.0 Component: test
Version: Boost Development Trunk Severity: Showstopper
Keywords: Cc: Gennadiy Rozental

Description

The stdcxx is the another implementation of the STL (initially based on RogueWave STL).

The following errors are encountered when running boost regression tests on msvc with stdcxx-4.2.0.

..\boost\test\impl\debug.ipp(827) : error C2039: 'memset' : is not a member of 'std'

..\boost\test\impl\execution_monitor.ipp(792) : error C3861: '_set_se_translator': identifier not found, even with argument-dependent lookup
..\boost\test\impl\execution_monitor.ipp(987) : error C3861: '_set_se_translator': identifier not found, even with argument-dependent lookup

The proposed patch:

--- boost\test\impl\debug.ipp
+++ boost\test\impl\debug.ipp
@@ -32,6 +32,7 @@
 #  include <windows.h>
 #  include <winreg.h>
 #  include <cstdio>
+#  include <cstring>   // for std::memset()
 
 #  if !defined(NDEBUG) && defined(_MSC_VER)
 #    define BOOST_MS_CRT_BASED_DEBUG

--- boost\test\impl\execution_monitor.ipp
+++ boost\test\impl\execution_monitor.ipp
@@ -65,7 +65,7 @@
 
 #  include <windows.h>
 
-#  if defined(__MWERKS__)
+#  if defined(__MWERKS__) || defined(_MSC_VER)
 #    include <eh.h>
 #  endif

Change History (8)

comment:1 by faridz@…, 15 years ago

Another error encountered on gcc/linux with stdcxx-4.2.0:

../boost/test/impl/debug.ipp:280: error: 'sscanf' is not a member of 'std'

The reason is that <stdio.h> #included, but used std::sscanf() instead of sscanf().

I propose to #include <cstdio> instead of <stdio.h> in unix implementation (line 72). In this case the #include <cstdio> and #include <cstring> lines, which are also present in windows implementation, can be moved to the top of file.

comment:3 by anonymous, 15 years ago

Could someone review Farid's patch and either commit it if it's appropriate or let us know if there's a problem with it? This problem is blocking our progress on building Boost with the Apache C++ Standard Library. Thanks!

comment:4 by Gennadiy Rozental, 15 years ago

Resolution: fixed
Status: newclosed

it should be applied by now

comment:5 by faridz@…, 15 years ago

Resolution: fixed
Status: closedreopened

The one problem still exist on ICC/Windows, because it uses headers from MSVC, but now <eh.h> #included on MSVC and Metrowerks only.

The proposed patch:

Index: boost/test/impl/execution_monitor.ipp
===================================================================
--- boost/test/impl/execution_monitor.ipp	(revision 43095)
+++ boost/test/impl/execution_monitor.ipp	(working copy)
@@ -65,7 +65,7 @@
 
 #  include <windows.h>
 
-#  if defined(__MWERKS__) || (defined(BOOST_MSVC) && !defined(UNDER_CE))
+#  if defined(__MWERKS__) || (defined(_MSC_VER) && !defined(UNDER_CE))
 #    include <eh.h>
 #  endif

comment:6 by faridz@…, 14 years ago

I see that the last problem was fixed in rev.44392, but what would be with including <eh.h> when compiling on MSVC9 (where _MSC_VER == 1500) ?

comment:7 by Farid Zaripov <faridz@…>, 14 years ago

The problem in boost/test/impl/execution_monitor.ipp is still present on MSVC 9.0 and ICC/Windows with using C-runtime from MSVC 9.0.

See here and here.

comment:8 by Beman Dawes, 14 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.