Link to home
Start Free TrialLog in
Avatar of chang2008
chang2008Flag for Germany

asked on

...\include\xstring warning

Halli Hallo ...

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>        ]

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chang2008

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.
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.