Opened 16 years ago
Closed 16 years ago
#882 closed Bugs (Fixed)
undeclared memcpy() in flex_string.hpp
| Reported by: | farid_zaripov | Owned by: | Hartmut Kaiser |
|---|---|---|---|
| Milestone: | Component: | wave | |
| Version: | None | Severity: | |
| Keywords: | Cc: |
Description
I have been working on the Apache C++ Standard Library project (STDCXX):
http://incubator.apache.org/stdcxx/
I've trying to compile the boost library with stdcxx.
The details can be found here:
http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200704.mbox/%
3c7BDB2168BEAEF14C98F1901FD2DE64386573EB@epmsa009.minsk.epam.com%3e
Boost version: 1.33.1
STDCXX version: 4.2
I've got the error in boost/wave/util/flex_string.hpp:
D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(126) : error C3861: 'memcpy': identifier not found
D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(654) : see reference to function template instantiation 'Pod *boost::wave::util::flex_string_details::pod_copy<char>(const Pod *,const Pod *,Pod *)' being compiled
with
[
Pod=char
]
D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(643) : while compiling class template member function 'void boost::wave::util::AllocatorStringStorage<E>::reserve(unsigned int)'
with
[
E=char
]
D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(1154) : see reference to class template instantiation 'boost::wave::util::AllocatorStringStorage<E>' being compiled
with
[
E=char
]
CALL "D:\Program Files\Microsoft Visual Studio 8\Common7\Tools\..\..\VC\bin\vcvars32.BAT" >nul
"D:\Program Files\Microsoft Visual Studio 8\Common7\Tools\..\..\VC\bin\cl" /Zm800 -nologo /EHsc -c -D_RWSTDDEBUG /Z7 /Od /Ob0 /EHsc /GR /MTd /Zc:forScope /Zc:wchar_t -I"bin\boost\libs\wave\build" -I"D:\_Libs\boost_1_33_1" -I"D:\_Projects\stdcxx_working\include" -I"D:\_Projects\stdcxx_working\include\ansi" -I"D:\_Projects\stdcxx_working\build\msvc-8.0\15s\include" -I"D:\_Libs\boost_1_33_1" -Fo"bin\boost\libs\wave\build\libboost_wave.lib\vc-8_0-stdcxx\debug\runtime-link-static\threading-multi\instantiate_cpp_exprgrammar.obj" -Tp"D:\_Libs\boost_1_33_1\libs\wave\build\../src/instantiate_cpp_exprgrammar.cpp"
I propose to #include <string.h> in flex_string.hpp file to declare memcpy().
Change History (6)
comment:2 by , 16 years ago
Logged In: YES user_id=353975 Originator: NO Thank you for submitting a bug report to BOOST
comment:3 by , 16 years ago
Logged In: YES
user_id=1760091
Originator: YES
In addition I have compiled boost with stdcxx on gcc 3.4.4 / Cygwin and got the following errors:
---------------------------------
In file included from /cygdrive/d/_libs/boost_1_33_1/boost/wave/wave_config.hpp:163,
from /cygdrive/d/_libs/boost_1_33_1/libs/wave/build/../src/instantiate_cpp_exprgrammar.cpp:10:
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp: In member function `T* boost::wave::util::mallocator<T>::allocate(size_t, const T*)':
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:195: error: there are no arguments to `malloc' that depend on a template parameter, so a declaration of `malloc' must be available
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:195: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:196: error: there are no arguments to `bad_alloc' that depend on a template parameter, so a declaration of `bad_alloc' must be available
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp: In member function `void boost::wave::util::SimpleStringStorage<E, A>::Init(typename A::size_type, typename A::size_type)':
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:311: error: `bad_alloc' is not a member of `std'
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp: In member function `void boost::wave::util::SimpleStringStorage<E, A>::reserve(typename A::size_type)':
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:410: error: `bad_alloc' is not a member of `std'
"gcc" -c -Wall -ftemplate-depth-255 -D_RWSTDDEBUG -g -O0 -fno-inline -mthreads -I"/cygdrive/d/_libs/boost_1_33_1/cygwin_bin/bin/boost/libs/wave/build" -I"/cygdrive/d/_libs/boost_1_33_1" -I "/cygdrive/d/_projects/stdcxx_working/include" -I "/cygdrive/d/_projects/stdcxx_working/include/ansi" -I "/cygdrive/d/_projects/stdcxx_working/cygwin/15s/include" -I "/cygdrive/d/_libs/boost_1_33_1" -o "/cygdrive/d/_libs/boost_1_33_1/cygwin_bin/bin/boost/libs/wave/build/libboost_wave.a/gcc-stdcxx/debug/runtime-link-static/threading-multi/instantiate_cpp_exprgrammar.o" "/cygdrive/d/_libs/boost_1_33_1/libs/wave/build/../src/instantiate_cpp_exprgrammar.cpp"
---------------------------------
I propose to #include <cstdlib> to declare malloc() and #include <new> to declare bad_alloc.
comment:4 by , 16 years ago
Logged In: YES user_id=353975 Originator: NO Fixed in Boost CVS::HEAD. Thanks for reporting! Regards Hartmut
comment:5 by , 16 years ago
Logged In: YES user_id=353975 Originator: NO Thank you for submitting a bug report to BOOST
comment:6 by , 16 years ago
| Status: | assigned → closed |
|---|
Note:
See TracTickets
for help on using tickets.
