2016-04-18 9 views
1

Я пытаюсь скомпилировать приложение Qt 5.5 с использованием msvc2010. Однако всякий раз, когда я пытаюсь его построить, я получаю несколько ошибок компоновщика, связанных с boost :: iostreams.QT Ошибки Linker с повышением iostreams

packagehandler.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall boost::iostreams::detail::gzip_header::reset(void)" ([email protected][email protected]@[email protected]@@QAEXXZ) referenced in function "public: __thiscall boost::iostreams::detail::gzip_header::gzip_header(void)" ([email protected]@[email protected]@@[email protected]) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall boost::iostreams::detail::gzip_footer::reset(void)" ([email protected][email protected]@[email protected]@@QAEXXZ) referenced in function "public: __thiscall boost::iostreams::detail::gzip_footer::gzip_footer(void)" ([email protected]@[email protected]@@[email protected]) 
packagehandler.obj:-1: error: LNK2001: unresolved external symbol "int const boost::iostreams::zlib::default_compression" ([email protected]@[email protected]@@3HB) 
packagehandler.obj:-1: error: LNK2001: unresolved external symbol "int const boost::iostreams::zlib::deflated" ([email protected]@[email protected]@@3HB) 
packagehandler.obj:-1: error: LNK2001: unresolved external symbol "int const boost::iostreams::zlib::default_strategy" ([email protected]@[email protected]@@3HB) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "protected: __thiscall boost::iostreams::detail::zlib_base::~zlib_base(void)" ([email protected]@[email protected]@@[email protected]) referenced in function [email protected][email protected]@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@@Z$0 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "protected: __thiscall boost::iostreams::detail::zlib_base::zlib_base(void)" ([email protected]@[email protected]@@[email protected]) referenced in function "public: __thiscall boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >::zlib_decompressor_impl<class std::allocator<char> >(struct boost::iostreams::zlib_params const &)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]@[email protected][email protected]@@Z) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "protected: void __thiscall boost::iostreams::detail::zlib_base::reset(bool,bool)" ([email protected][email protected]@[email protected]@@[email protected]) referenced in function "public: __thiscall boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >::~zlib_decompressor_impl<class std::allocator<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]@[email protected]) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "private: void __thiscall boost::iostreams::detail::zlib_base::do_init(struct boost::iostreams::zlib_params const &,bool,void * (__cdecl*)(void *,unsigned int,unsigned int),void (__cdecl*)(void *,void *),void *)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]@[email protected]) referenced in function "protected: void __thiscall boost::iostreams::detail::zlib_base::init<class std::allocator<char> >(struct boost::iostreams::zlib_params const &,bool,struct boost::iostreams::detail::zlib_allocator<class std::allocator<char>,class std::allocator<char> > &)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@Z) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall boost::iostreams::detail::gzip_footer::process(char)" ([email protected][email protected]@[email protected]@@[email protected]) referenced in function [email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]@@[email protected][email protected]@[email protected]@@[email protected]@@[email protected][email protected]@[email protected]@@[email protected]@[email protected]$0 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall boost::iostreams::detail::gzip_header::process(char)" ([email protected][email protected]@[email protected]@@[email protected]) referenced in function "public: __int64 __thiscall boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::read<class boost::iostreams::detail::linked_streambuf<char,struct std::char_traits<char> > >(class boost::iostreams::detail::linked_streambuf<char,struct std::char_traits<char> > &,char *,__int64)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]@@[email protected][email protected]@[email protected]@@[email protected]@@[email protected][email protected]@[email protected]@@[email protected]@[email protected]) 
packagehandler.obj:-1: error: LNK2001: unresolved external symbol "int const boost::iostreams::zlib::okay" ([email protected]@[email protected]@@3HB) 
packagehandler.obj:-1: error: LNK2001: unresolved external symbol "int const boost::iostreams::zlib::stream_end" ([email protected]@[email protected]@@3HB) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "public: static void __cdecl boost::iostreams::zlib_error::check(int)" ([email protected][email protected]@[email protected]@[email protected]) referenced in function "public: bool __thiscall boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >::filter(char const * &,char const *,char * &,char *,bool)" ([email protected][email protected]?$alloc[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "protected: void __thiscall boost::iostreams::detail::zlib_base::after(char const * &,char * &,bool)" ([email protected][email protected]@[email protected]@@[email protected]) referenced in function "public: bool __thiscall boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >::filter(char const * &,char const *,char * &,char *,bool)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]@[email protected]) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "protected: int __thiscall boost::iostreams::detail::zlib_base::xinflate(int)" ([email protected][email protected]@[email protected]@@[email protected]) referenced in function "public: bool __thiscall boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >::filter(char const * &,char const *,char * &,char *,bool)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]@[email protected]) 
packagehandler.obj:-1: error: LNK2001: unresolved external symbol "int const boost::iostreams::zlib::sync_flush" ([email protected]@[email protected]@@3HB) 
packagehandler.obj:-1: error: LNK2019: unresolved external symbol "protected: void __thiscall boost::iostreams::detail::zlib_base::before(char const * &,char const *,char * &,char *)" ([email protected][email protected]@[email protected]@@[email protected]) referenced in function "public: bool __thiscall boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >::filter(char const * &,char const *,char * &,char *,bool)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]@[email protected]) 
debug\EmbeddedBoardTestScriptUtility.exe:-1: error: LNK1120: 18 unresolved externals 
+0

TL; DR: Все C++ код, который использует C++, API, когда связаны друг с другом, должны быть скомпилированы с использованием той же основной выпуск Visual Studio, по крайней мере. –

+0

@KubaOber Возможно, мой вопрос был неясным, я перестроил boost для msvc2010. Я не использую msvc2008 .dlls – CountBale

ответ

0

Вы должны проверить, если libboost_iostreams .LIB библиотека доступна в каталоге Повышения библиотек и если если правильно связана в связывании каталогов и связанные библиотек в настройках линкера проекта.

Если вы скомпилировали boost и сомневаетесь в компиляции boost (его можно скомпилировать с множеством опций, за исключением некоторых проектов), вы можете использовать предварительно скомпилированные двоичные файлы, доступные на sourceforge [1].

[1] https://sourceforge.net/projects/boost/files/boost-binaries/1.60.0/

+0

Он доступен, я попробовал переименовать файл, и программа вообще не скомпилировалась, так и не попала в компоновщик. – CountBale

+0

Вы уверены, что у вас есть только одна версия Boost на вашем ПК? Для какой архитектуры вы компилируете (32 бит или 64 бит)? Версия Boost, которую вы связываете, - это та самая архитектура, которую вы пытаетесь скомпилировать? –

+0

У меня есть две версии boost (один скомпилирован для msvc2008 и один для msvc2010), но я подтвердил, что он пытается связать его с правильным. И да, оба 32 бит. Я тестировал с boost :: chrono, и эта ссылка корректна, кажется, это определенная проблема с этой библиотекой. – CountBale