Sign in to follow this  

boost::threads

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just tried using the boost::threads library and got some odd warnings, all of the sort
C:\...\boost\thread\thread.hpp(38): warning C4275: non dll-interface class 'boost::noncopyable' used as base for dll-interface class 'boost::thread'
Most or the warnings are for classes deriving from boost::noncopyable but there is also one for std::logic_error and std::runtime_error. I can't see it causing any problems but it's fairly annoying having 10+ pointless warnings for every compilation unit, and I don't want to disable the warning either since I'm exporting classes myself. Is this 'normal', or am I doing something stupid? I know I can always do
#pragma warning(push)
#pragma warning(disable:4275)
#include <boost/thread.hpp>
#pragma warning(pop)
....but I'd rather fix the cause.

Share this post


Link to post
Share on other sites
yeah, i've had the same thing during my time using it, i've just ignored them and had no problems (infact, i switched off the C4275 warning after reading about it not being important, something todo with the libraries dll interface, i forget the specifics).

The std::logic_error and std::runtime_error are also slightly annoying, but again can be ingored safely it seems. Intrestingly enuff, in my last project they didnt turn up every recompile, sometimes i'd see it every time, some days i wouldnt see them at all. Either way, again they dont seem to effect anything (the software i've got using it runs every 3mins or so everyday and has been doing so since around march, if it was going to cause problems i'd have thought it would have been noticed by now, specifically as the threading is core to the whole system working).

Share this post


Link to post
Share on other sites
Quote:
Original post by _the_phantom_
yeah, i've had the same thing during my time using it, i've just ignored them and had no problems (infact, i switched off the C4275 warning after reading about it not being important, something todo with the libraries dll interface, i forget the specifics).

The std::logic_error and std::runtime_error are also slightly annoying, but again can be ingored safely it seems. Intrestingly enuff, in my last project they didnt turn up every recompile, sometimes i'd see it every time, some days i wouldnt see them at all. Either way, again they dont seem to effect anything (the software i've got using it runs every 3mins or so everyday and has been doing so since around march, if it was going to cause problems i'd have thought it would have been noticed by now, specifically as the threading is core to the whole system working).

Kewl, so its not me then [smile]
Thanks, I figured that would be the case. I guess I'll just wrap the offending #include's with the warning push/pops.

Share this post


Link to post
Share on other sites

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this