My question is related to something, while I'm trying to do slightly more than what is described here, i.e. a directory boost's filesystem Using libraries and doing some processing on image files with OpenCV.
I've compiled file systems and other libraries with Minigid, and tried to run Boost 1.45, OpenCiv 2.2 and Elegant 2 with Eclipse CDT on Windows 7 64. The Bit System Filesystem Library is compiled and runs without problems, if used in the project itself, but with the above two other libraries, I get the following errors:
In the included file: Boost_1_45_0 / boost / filesystem/v3/pass_traits.hpp: 22: 0, from C: \ boost_1_45_0 / boost / filesystem / v3 / path.hpp: 25, from C: \ boost_1_45_0 / boost / filesystem.hpp: 32, from . \ Src \ ComputeNatScaleFunction.cpp: 18: C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 'boost :: decay and lt; Cv :: and lieutenant; Anonymous Anom & gt; & Gt; ': C: \ cmake_binaries \ include / opencv2 / core / operations.hpp: 766: 23: instant C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 28: 66: error:' cv :: '/ C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 28: 66: Error: Promote promotion template template: remove_reference 'C: \ boost_1_45_0 / boost / type_traits / Decay.hpp: 38: 17: Error: 'CV ::' / uses anonymous type C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 38: 17: Error: Try to promote template structure: For promotion: remove_ Reference 'C: \ boost_1_45_0 / boost /type_traits/decay.hpp:' boost :: decay and lt; Cv :: and lieutenant; Anonymous Anom & gt; & Gt; ': C: \ cmake_binaries \ include / opencv2 / core / operations.hpp: 917: 21: instant C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 28: 66: error:' cv :: '/ C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 28: 66: Error: Promote promotion template template: remove_reference 'C: \ boost_1_45_0 / boost / type_traits / Decay.hpp: 38: 17: Error: Uses 'CV ::' / anonymous type C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 38: 17: Error: Try to promote template structure: For promotion: remove_reference 'C: \ Boost_1_45_0 / boost /type_traits/decay.hpp: 'Promotion: Decay & amp; EEGN :: And LeTinum; Anonymous Enum & gt; & Gt; Instant C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 28: 66: Error: 'Eugene ::' is / C: \ Eigen2 / Eigen / src / Core / GenericPacketMath.h: 116: 18: C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 28: 66: Error: Promote promotion template template: remove_reference 'C: \ boost_1_45_0 / boost / type_traits / Decay.hpp: 38: 17: Error: Uses 'Egene ::' / anonymous type C: \ boost_1_45_0 / boost / type_traits / decay.hpp: 38: 17: Error: Try to promote template structure: For promotion: remove_reference ' etc.
Any indication why these libraries can fight with each other? The compiler is not getting the file system (i.e. line 18) before joining.
Using promotion: The reason for the compiler to fail to file system namespace before adding Eigen Is created:
#include & lt; Boost / filesystem.hpp & gt; Namespace Promotion: Using File System; #include & lt; Eigen / Core & gt; fails, but
#include & lt; Boost / filesystem.hpp & gt; #include & lt; Eigen / Core & gt; Namespace Promotion: Using File System; Works.
The reason for this is that if the Boost: File System is added to the global namespace, it pollutes it, and some code (here: Egan) causes the errors during the compilation The reason for the reason depends on reputed namespace. There is nothing weird about it, generally you should never include the lines before "using".
Comments
Post a Comment