[gecode-users] msvc 8.0 SP1 warning C4251
Filip Konvička
filip.konvicka at logis.cz
Mon Aug 27 09:04:21 CEST 2007
Hi,
simply including Gecode 1.3.1 headers (kernel.hh, int.hh, search.hh)
caused the C4251 warning. Looking at the class definitions, I see the
warning can be safely ignored, but it might still be worth wrapping the
definitions in a
#pragma warning(push) + #pragma warning(disable : 4251) + #pragma
warning(pop)
block. BTW, did you consider using the pimpl idiom to hide the *Engine
implementation classes? Why are the engine members "protected" and not
"private", anyway? (Deriving from Gecode::Search::DFS would make this
non-dll-export class accessible, wouldn't it?) I know that this is all a
bit of hair-splitting.... :-)
Cheers,
Filip
1>c:\program files\gecode\include\gecode\search.hh(360) : warning C4251:
'Gecode::Search::DFS::e' : class 'Gecode::Search::DfsEngine' needs to
have dll-interface to be used by clients of class 'Gecode::Search::DFS'
1> c:\program files\gecode\include\gecode\search.hh(318) : see
declaration of 'Gecode::Search::DfsEngine'
1>c:\program files\gecode\include\gecode\search.hh(481) : warning C4251:
'Gecode::Search::LDS::e' : class 'Gecode::Search::ProbeEngine' needs to
have dll-interface to be used by clients of class 'Gecode::Search::LDS'
1> c:\program files\gecode\include\gecode\search.hh(428) : see
declaration of 'Gecode::Search::ProbeEngine'
1>c:\program files\gecode\include\gecode\search.hh(607) : warning C4251:
'Gecode::Search::BAB::e' : class 'Gecode::Search::BabEngine' needs to
have dll-interface to be used by clients of class 'Gecode::Search::BAB'
1> c:\program files\gecode\include\gecode\search.hh(543) : see
declaration of 'Gecode::Search::BabEngine'
More information about the gecode-users
mailing list