Visual C++ 2003 and Boost 1.35
Hello!
I'm having a problem with using Boost 1.35 on Visual C++ 2003 SP1. Take a
look at the following very simple program:
------------------------------------
#include "stdafx.h"
#include
AMDG Tomek Jerzykowski wrote:
------------------------------------ BoostTest2.cpp c:\BoostTest2\BoostTest2.cpp(11) : warning C4018: '<' : signed/unsigned mismatch
If I remove #include
You can either compile with warning level 3 rather than warning level 4 or you can explicitly suppress just warning 4018. In Christ, Steven Watanabe
Tomek Jerzykowski wrote:
------------------------------------ BoostTest2.cpp c:\BoostTest2\BoostTest2.cpp(11) : warning C4018: '<' : signed/unsigned mismatch
If I remove #include
You can either compile with warning level 3 rather than warning level 4 or you can explicitly suppress just warning 4018.
In Christ, Steven Watanabe
I was not quite clear about what is bothering me. The problem is that every warning and every compiler error is followed by a lot of meaningless messages. The abovementioned example was intentionally fed with the warning to show you what is going on. I know quite well how to suppress warnings and know how to fix them, but in the source code of the project I'm working now there are quite a lot of warnings, what results in an utter flood of messages during compilation. I want to introduce Boost to my co-workers, but I know that if I tell them that every time they write some code with warnings or errors, they are flooded with meaningless stuff... they will refuse using this tool. Tomek
Tomek Jerzykowski schrieb:
Tomek Jerzykowski wrote:
------------------------------------ BoostTest2.cpp c:\BoostTest2\BoostTest2.cpp(11) : warning C4018: '<' : signed/unsigned mismatch
If I remove #include
You can either compile with warning level 3 rather than warning level 4 or you can explicitly suppress just warning 4018.
In Christ, Steven Watanabe
I was not quite clear about what is bothering me. The problem is that every warning and every compiler error is followed by a lot of meaningless messages. The abovementioned example was intentionally fed with the warning to show you what is going on. I know quite well how to suppress warnings and know how to fix them, but in the source code of the project I'm working now there are quite a lot of warnings, what results in an utter flood of messages during compilation.
The extra messages are generated allways for templates. It is only possible to suppress the warnings. I'm working with VS2005 and I do not have a lot of warnings (only the secure warnings...). I don't think that someone can provide you more information If you say only that you have warnings. Best regards Hansjörg
I want to introduce Boost to my co-workers, but I know that if I tell them that every time they write some code with warnings or errors, they are flooded with meaningless stuff... they will refuse using this tool.
Tomek
I was not quite clear about what is bothering me. The problem is that every warning and every compiler error is followed by a lot of meaningless messages. The abovementioned example was intentionally fed with the warning to show you what is going on. I know quite well how to suppress warnings and know how to fix them, but in the source code of the project I'm working now there are quite a lot of warnings, what results in an utter flood of messages during compilation.
The extra messages are generated allways for templates. It is only possible to suppress the warnings. I'm working with VS2005 and I do not have a lot of warnings (only the secure warnings...). I don't think that someone can provide you more information If you say only that you have warnings.
I've tested the same program on Visual Studio 2008 and there is no unnecessary spam in compiler output, only the proper warning is displayed. I call it spam, because extra messages are completely unrelated to the warning cause. I don't even use Boost in this program, just include a header! Unfortunately, we cannot use VS 2008 it in our office. Tomek
AMDG Tomek Jerzykowski wrote:
I was not quite clear about what is bothering me. The problem is that every warning and every compiler error is followed by a lot of meaningless messages. The abovementioned example was intentionally fed with the warning to show you what is going on. I know quite well how to suppress warnings and know how to fix them, but in the source code of the project I'm working now there are quite a lot of warnings, what results in an utter flood of messages during compilation.
I want to introduce Boost to my co-workers, but I know that if I tell them that every time they write some code with warnings or errors, they are flooded with meaningless stuff... they will refuse using this tool.
Ok. I see. This is really weird. I have no idea what's causing this behavior. Do other Boost headers have similar effects? In Christ, Steven Watanabe
I was not quite clear about what is bothering me. The problem is that every warning and every compiler error is followed by a lot of meaningless messages. The abovementioned example was intentionally fed with the warning to show you what is going on. I know quite well how to suppress warnings and know how to fix them, but in the source code of the project I'm working now there are quite a lot of warnings, what results in an utter flood of messages during compilation.
I want to introduce Boost to my co-workers, but I know that if I tell
Tomek Jerzykowski wrote: them
that every time they write some code with warnings or errors, they are flooded with meaningless stuff... they will refuse using this tool.
Ok. I see. This is really weird. I have no idea what's causing this behavior. Do other Boost headers have similar effects?
In Christ, Steven Watanabe
Not all headers cause this problem. For example,
Tomek Jerzykowski wrote:
Not all headers cause this problem. For example,
works fine. I guess these upgradeable mutexes are quite new in Boost and not tested well on rather old compiler? Anyway, before I asked you, I used google and saw that it happens to many people, but found no answers nor workarounds.
FWIW, it's not just boost it happens with. We regularly hit the same problem with STLport.
On Friday, June 13, 2008 6:26 AM Tomek Jerzykowski wrote:
------------------------------------ #include "stdafx.h" #include
int _tmain(int argc, _TCHAR* argv[]) { int i = 0; unsigned int j = 2; j < i; return 0; } ------------------------------------ BoostTest2.cpp c:\BoostTest2\BoostTest2.cpp(11) : warning C4018: '<' : signed/unsigned mismatch
This is not a compiler "bug". The compiler is right to give you the
warning although I agree the messages are rather verbose because you are
dealing with templates. There are tools out there to make these messages
more succinct but in this specific case I think it is safe for you to
ignore the warning. Here is how to do it in VC++
#pragma warning (push)
#pragma warning (disable:4018)
#include
Tomek Jerzykowski wrote:
Hello!
I'm having a problem with using Boost 1.35 on Visual C++ 2003 SP1. Take a look at the following very simple program:
------------------------------------ #include "stdafx.h" #include
int _tmain(int argc, _TCHAR* argv[]) { int i = 0; unsigned int j = 2; j < i; return 0; } ------------------------------------ It does nothing, just emits a compiler warning. Unfortunately, this warning is followed by lots of meaningless messages related to the included Boost header:
I'm guessing you are using a /clr application? There are quite a few emails in the archives of this list w.r.t incompatibility of /clr and the boost threaded stuff, but I have yet to find any working solutions. -- alfonso e. urdaneta _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the originator of the message. This footer also confirms that this e-mail message has been scanned for the presence of computer viruses. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Indra Systems, Inc.
participants (6)
-
Alfonso Urdaneta
-
Delfin Rojas
-
Hansi
-
Steve Toledo-Brown
-
Steven Watanabe
-
Tomek Jerzykowski