c++ - Error compiling in release mode but not in debug mode -
when compile on vs 2008 in deubg mode works fine. when compile same thing in release mode not works. far can tell include directories same , there no additional preprocessor symbols.
any help?
1>zlib.cpp 1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\xutility(419) : error c2664: 'cryptopp::allocatorwithcleanup::allocatorwithcleanup(const cryptopp::allocatorwithcleanup &)' : cannot convert parameter 1 'cryptopp::allocatorwithcleanup' 'const cryptopp::allocatorwithcleanup &' 1> 1> [ 1>
t=std::_aux_cont 1> ] 1>
, 1> [ 1>
t=cryptopp::huffmandecoder::codeinfo 1> ] 1> , 1> [ 1> t=std::_aux_cont 1>
] 1> reason: cannot convert 'cryptopp::allocatorwithcleanup' 'const cryptopp::allocatorwithcleanup' 1> 1> [ 1>
t=cryptopp::huffmandecoder::codeinfo 1> ] 1> , 1> [ 1> t=std::_aux_cont 1>
] 1> no user-defined-conversion operator available can perform conversion, or operator cannot called 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\xutility(417) : while compiling class template member function 'std::_container_base_aux_alloc_real<_alloc>::_container_base_aux_alloc_real(_alloc)' 1> 1> [ 1>
_alloc=cryptopp::allocatorwithcleanup 1> ] 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\vector(421) : see reference class template instantiation 'std::_container_base_aux_alloc_real<_alloc>' being compiled 1> 1>
[ 1>
_alloc=cryptopp::allocatorwithcleanup 1> ] 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\vector(439) : see reference class template instantiation 'std::_vector_val<_ty,_alloc>' being compiled 1> 1> [ 1> _ty=cryptopp::huffmandecoder::codeinfo, 1>
_alloc=cryptopp::allocatorwithcleanup 1> ] 1>
c:\myproject\sshlib\zinflate.h(79) : see reference class template instantiation 'std::vector<_ty,_ax>' being compiled 1> 1>
[ 1>
_ty=cryptopp::huffmandecoder::codeinfo, 1>
_ax=cryptopp::allocatorwithcleanup 1> ] 1>zinflate.cpp
the line of code points is:
std::vector<codeinfo, allocatorwithcleanup<codeinfo> > m_codetovalue;
edit: more info:
i error when preprocessor contains ndebug instead of _debug. if change release config have _debug isntead compiles. why?
it's bug in visual c++ compiler. see http://old.nabble.com/-jira--created:-%28qpid-1458%29-c%2b%2b-common-compile-error-in-vc9-release-mode-td20469700.html.
you can work around disabling checked iterators:
#define _secure_scl 0
but warned: if link against third-party library compiled _secure_scl
enabled, e.g. boost, memory corruption can (and will) occur.
Comments
Post a Comment