VS2015 Build Problems
Posted: Thu Mar 02, 2017 12:50 pm
Hello there!
I am trying to use OME to read in a TIFF, but I cannot get the example file working with the self-contained "super" builds after two days of trying. I am using C++ VS2015 on Windows 10.
I've dealt with some of the errors that seems to be Bosst issues, but am stumped
This is the super build
http://downloads.openmicroscopy.org/ome-files-cpp/0.3.1/21/binaries/ome-files-bundle-0.3.1-VC14-x64-Debug-b21.zip
And the sample code
http://downloads.openmicroscopy.org/ome-files-cpp/0.3.1/21/docs/ome-files-bundle-docs-0.3.1-b21/ome-files/manual/html/_downloads/metadata-formatreader.cpp
I've dealt with a few errors along the way and somewhat have dealt with them.
I get three errors like this.
Error C4996 'std::copy::_Unchecked_iterators::_Deprecate': Call to 'std::copy' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.
I deal with this by adding -D_SCL_SECURE_NO_WARNINGS to C/C++ Command Line
I then get this error, which seems to be looking for a file that does not exist in the super build.
LNK1104 cannot open file 'libboost_filesystem-vc140-mt-gd-1_63.lib' TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\LINK 1
After a bit more reading, I enable the boost/config/user.hpp BOOST_ALL_DYN_LINK
#define BOOST_ALL_DYN_LINK
which then gets me to a bunch of unresolved externals (see below)
Any ideas? Apologies if I am missing something really basic. A working sample project on the tutorial page would be most helpful. I'd be most happy to contribute one if I can get it working.
Cheers
Justin
rror (active) a reference of type "boost::filesystem::path::iterator &" (not const-qualified) cannot be initialized with a value of type "boost::filesystem::path::iterator" TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 691
Error (active) a reference of type "boost::filesystem::path::iterator &" (not const-qualified) cannot be initialized with a value of type "boost::filesystem::path::iterator" TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 692
Error (active) member "boost::filesystem::path::dot" may not be initialized TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 67
Error (active) member "boost::filesystem::path::preferred_separator" may not be initialized TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 66
Error (active) member "boost::filesystem::path::separator" may not be initialized TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 65
Error LNK2019 unresolved external symbol "public: static class boost::general_storage_order<9> __cdecl ome::files::PixelBufferBase::default_storage_order(void)" (?default_storage_order@PixelBufferBase@files@ome@@SA?AV?$general_storage_order@$08@boost@@XZ) referenced in function "public: __cdecl ome::files::VariantPixelBuffer::VariantPixelBuffer(void)" (??0VariantPixelBuffer@files@ome@@QEAA@XZ) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: unsigned __int64 __cdecl ome::files::VariantPixelBuffer::num_elements(void)const " (?num_elements@VariantPixelBuffer@files@ome@@QEBA_KXZ) referenced in function "void __cdecl `anonymous namespace'::readPixelData(class ome::files::FormatReader const &,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?readPixelData@?A0x23f25ee6@@YAXAEBVFormatReader@files@ome@@AEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: __cdecl ome::files::in::TIFFReader::TIFFReader(void)" (??0TIFFReader@in@files@ome@@QEAA@XZ) referenced in function "public: __cdecl std::_Ref_count_obj<class ome::files::in::TIFFReader>::_Ref_count_obj<class ome::files::in::TIFFReader><>(void)" (??$?0$$V@?$_Ref_count_obj@VTIFFReader@in@files@ome@@@std@@QEAA@XZ) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: __cdecl ome::xml::model::enums::PixelType::PixelType(class ome::xml::model::enums::PixelType const &)" (??0PixelType@enums@model@xml@ome@@QEAA@AEBV01234@@Z) referenced in function "protected: static class boost::variant<struct boost::detail::variant::over_sequence<struct boost::mpl::vector11<class std::shared_ptr<class ome::files::PixelBuffer<signed char> >,class std::shared_ptr<class ome::files::PixelBuffer<short> >,class std::shared_ptr<class ome::files::PixelBuffer<int> >,class std::shared_ptr<class ome::files::PixelBuffer<unsigned char> >,class std::shared_ptr<class ome::files::PixelBuffer<unsigned short> >,class std::shared_ptr<class ome::files::PixelBuffer<unsigned int> >,class std::shared_ptr<class ome::files::PixelBuffer<bool> >,class std::shared_ptr<class ome::files::PixelBuffer<float> >,class std::shared_ptr<class ome::files::PixelBuffer<double> >,class std::shared_ptr<class ome::files::PixelBuffer<class std::complex<float> > >,class std::shared_ptr<class ome::files::PixelBuffer<class std::complex<double> > > > >,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_> __cdecl ome::files::VariantPixelBuffer::makeBuffer<signed char>(class boost::detail::multi_array::extent_gen<9> const &,class boost::general_storage_order<9> const &,class ome::xml::model::enums::PixelType)" (??$makeBuffer@C@VariantPixelBuffer@files@ome@@KA?AV?$variant@U?$over_sequence@U?$vector11@V?$shared_ptr@V?$PixelBuffer@C@files@ome@@@std@@V?$shared_ptr@V?$PixelBuffer@F@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@H@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@E@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@G@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@I@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@_N@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@M@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@N@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@V?$complex@M@std@@@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@V?$complex@N@std@@@files@ome@@@2@@mpl@boost@@@0detail@boost@@Uvoid_@023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@@boost@@AEBV?$extent_gen@$08@multi_array@detail@4@AEBV?$general_storage_order@$08@4@VPixelType@enums@model@xml@2@@Z) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: __cdecl ome::xml::model::enums::PixelType::PixelType(enum ome::xml::model::enums::PixelType::enum_value)" (??0PixelType@enums@model@xml@ome@@QEAA@W4enum_value@01234@@Z) referenced in function "public: __cdecl ome::files::VariantPixelBuffer::VariantPixelBuffer(void)" (??0VariantPixelBuffer@files@ome@@QEAA@XZ) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "void __cdecl ome::common::setLogLevel(enum boost::log::v2_mt_nt6::trivial::severity_level)" (?setLogLevel@common@ome@@YAXW4severity_level@trivial@v2_mt_nt6@log@boost@@@Z) referenced in function main TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
I am trying to use OME to read in a TIFF, but I cannot get the example file working with the self-contained "super" builds after two days of trying. I am using C++ VS2015 on Windows 10.
I've dealt with some of the errors that seems to be Bosst issues, but am stumped
This is the super build
http://downloads.openmicroscopy.org/ome-files-cpp/0.3.1/21/binaries/ome-files-bundle-0.3.1-VC14-x64-Debug-b21.zip
And the sample code
http://downloads.openmicroscopy.org/ome-files-cpp/0.3.1/21/docs/ome-files-bundle-docs-0.3.1-b21/ome-files/manual/html/_downloads/metadata-formatreader.cpp
I've dealt with a few errors along the way and somewhat have dealt with them.
I get three errors like this.
Error C4996 'std::copy::_Unchecked_iterators::_Deprecate': Call to 'std::copy' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.
I deal with this by adding -D_SCL_SECURE_NO_WARNINGS to C/C++ Command Line
I then get this error, which seems to be looking for a file that does not exist in the super build.
LNK1104 cannot open file 'libboost_filesystem-vc140-mt-gd-1_63.lib' TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\LINK 1
After a bit more reading, I enable the boost/config/user.hpp BOOST_ALL_DYN_LINK
#define BOOST_ALL_DYN_LINK
which then gets me to a bunch of unresolved externals (see below)
Any ideas? Apologies if I am missing something really basic. A working sample project on the tutorial page would be most helpful. I'd be most happy to contribute one if I can get it working.
Cheers
Justin
rror (active) a reference of type "boost::filesystem::path::iterator &" (not const-qualified) cannot be initialized with a value of type "boost::filesystem::path::iterator" TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 691
Error (active) a reference of type "boost::filesystem::path::iterator &" (not const-qualified) cannot be initialized with a value of type "boost::filesystem::path::iterator" TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 692
Error (active) member "boost::filesystem::path::dot" may not be initialized TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 67
Error (active) member "boost::filesystem::path::preferred_separator" may not be initialized TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 66
Error (active) member "boost::filesystem::path::separator" may not be initialized TiFFReader c:\omeVC14-x64\include\boost\filesystem\path.hpp 65
Error LNK2019 unresolved external symbol "public: static class boost::general_storage_order<9> __cdecl ome::files::PixelBufferBase::default_storage_order(void)" (?default_storage_order@PixelBufferBase@files@ome@@SA?AV?$general_storage_order@$08@boost@@XZ) referenced in function "public: __cdecl ome::files::VariantPixelBuffer::VariantPixelBuffer(void)" (??0VariantPixelBuffer@files@ome@@QEAA@XZ) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: unsigned __int64 __cdecl ome::files::VariantPixelBuffer::num_elements(void)const " (?num_elements@VariantPixelBuffer@files@ome@@QEBA_KXZ) referenced in function "void __cdecl `anonymous namespace'::readPixelData(class ome::files::FormatReader const &,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?readPixelData@?A0x23f25ee6@@YAXAEBVFormatReader@files@ome@@AEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: __cdecl ome::files::in::TIFFReader::TIFFReader(void)" (??0TIFFReader@in@files@ome@@QEAA@XZ) referenced in function "public: __cdecl std::_Ref_count_obj<class ome::files::in::TIFFReader>::_Ref_count_obj<class ome::files::in::TIFFReader><>(void)" (??$?0$$V@?$_Ref_count_obj@VTIFFReader@in@files@ome@@@std@@QEAA@XZ) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: __cdecl ome::xml::model::enums::PixelType::PixelType(class ome::xml::model::enums::PixelType const &)" (??0PixelType@enums@model@xml@ome@@QEAA@AEBV01234@@Z) referenced in function "protected: static class boost::variant<struct boost::detail::variant::over_sequence<struct boost::mpl::vector11<class std::shared_ptr<class ome::files::PixelBuffer<signed char> >,class std::shared_ptr<class ome::files::PixelBuffer<short> >,class std::shared_ptr<class ome::files::PixelBuffer<int> >,class std::shared_ptr<class ome::files::PixelBuffer<unsigned char> >,class std::shared_ptr<class ome::files::PixelBuffer<unsigned short> >,class std::shared_ptr<class ome::files::PixelBuffer<unsigned int> >,class std::shared_ptr<class ome::files::PixelBuffer<bool> >,class std::shared_ptr<class ome::files::PixelBuffer<float> >,class std::shared_ptr<class ome::files::PixelBuffer<double> >,class std::shared_ptr<class ome::files::PixelBuffer<class std::complex<float> > >,class std::shared_ptr<class ome::files::PixelBuffer<class std::complex<double> > > > >,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_> __cdecl ome::files::VariantPixelBuffer::makeBuffer<signed char>(class boost::detail::multi_array::extent_gen<9> const &,class boost::general_storage_order<9> const &,class ome::xml::model::enums::PixelType)" (??$makeBuffer@C@VariantPixelBuffer@files@ome@@KA?AV?$variant@U?$over_sequence@U?$vector11@V?$shared_ptr@V?$PixelBuffer@C@files@ome@@@std@@V?$shared_ptr@V?$PixelBuffer@F@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@H@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@E@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@G@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@I@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@_N@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@M@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@N@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@V?$complex@M@std@@@files@ome@@@2@V?$shared_ptr@V?$PixelBuffer@V?$complex@N@std@@@files@ome@@@2@@mpl@boost@@@0detail@boost@@Uvoid_@023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@U4023@@boost@@AEBV?$extent_gen@$08@multi_array@detail@4@AEBV?$general_storage_order@$08@4@VPixelType@enums@model@xml@2@@Z) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "public: __cdecl ome::xml::model::enums::PixelType::PixelType(enum ome::xml::model::enums::PixelType::enum_value)" (??0PixelType@enums@model@xml@ome@@QEAA@W4enum_value@01234@@Z) referenced in function "public: __cdecl ome::files::VariantPixelBuffer::VariantPixelBuffer(void)" (??0VariantPixelBuffer@files@ome@@QEAA@XZ) TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1
Error LNK2019 unresolved external symbol "void __cdecl ome::common::setLogLevel(enum boost::log::v2_mt_nt6::trivial::severity_level)" (?setLogLevel@common@ome@@YAXW4severity_level@trivial@v2_mt_nt6@log@boost@@@Z) referenced in function main TiFFReader C:\omeVC14-x64\TiFFReader\TiFFReader\TiFFReader.obj 1