chang2008
asked on
...\include\xstring warning
Halli Hallo ...
What does this warning mean and how to solve it?
Thank you very much in advance ...
What does this warning mean and how to solve it?
Thank you very much in advance ...
1>C:\Programme\Microsoft Visual Studio 9.0\VC\include\xstring(2092) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
1> C:\Programme\Microsoft Visual Studio 9.0\VC\include\xstring(2083) : while compiling class template member function 'void std::basic_string<_Elem,_Traits,_Ax>::_Copy(unsigned int,unsigned int)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1> C:\Programme\Microsoft Visual Studio 9.0\VC\include\xstring(2221) : see reference to class template instantiation 'std::basic_string<_Elem,_Traits,_Ax>' being compiled
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
More info: http://msdn.microsoft.com/en-us/library/1deeycx5.aspx
Just an aside - you can usually ignore warnings without problems. It is what it is - a warning that something is not quite correct but might not be a problem in reality.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have enabled C++ Exceptions and then the warning is gone.
Project property -> C/C++ -> Code Generation -> Enable C++ Exceptions [ set as "Yes(/EHsc) ]
I prefer to have my code without warning and I don't want to ignore it. When the waring is shown, I feel that it means something wrong and can cause a problem in the future. I do agree with evilrix.
Thanks for all comments.
Project property -> C/C++ -> Code Generation -> Enable C++ Exceptions [ set as "Yes(/EHsc) ]
I prefer to have my code without warning and I don't want to ignore it. When the waring is shown, I feel that it means something wrong and can cause a problem in the future. I do agree with evilrix.
Thanks for all comments.
ASKER
Thank you very much and have a nice day. :)
I think you (and evilrix) might have misunderstood.
Errors must be fixed.
Warnings must be checked, but they might be ignored if it is safe to do so.
Errors must be fixed.
Warnings must be checked, but they might be ignored if it is safe to do so.