
Hello, Sorry for cross-posting. I'm facing an issue with Qt (4.7.2, installed from Qt installer) with Boost.Filesystem v3 (1.46.1) on VS2008. I'm facing linker errors with QString::toStdWString when /Zc:wchar_t is set like this: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __thiscall QString::toStdWString(void)const " (__imp_?toStdWString@QString@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) referenced in function "private: void __thiscall DirView::readDirectory(class QModelIndex const &)" (?readDirectory@DirView@@AAEXABVQModelIndex@@@Z) and linker errors with std::codecvt when /Zc:wchar_t- is set like this: unresolved external symbol "__declspec(dllimport) public: static class std::codecvt<unsigned short,char,int> const & __cdecl boost::filesystem3::path::codecvt(void)" (__imp_?codecvt@path@filesystem3@boost@@SAABV?$codecvt@GDH@std@@XZ) referenced in function "public: __thiscall boost::filesystem3::path::path<class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > >(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,void *)" (??$?0V?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@path@filesystem3@boost@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@PAX@Z) How can i use Qt with boost filesystem ? Thanks in advance, Surya

Surya Kiran Gullapalli on 5. Juni 2011 21:04:
Hello, Sorry for cross-posting. I'm facing an issue with Qt (4.7.2, installed from Qt installer) with Boost.Filesystem v3 (1.46.1) on VS2008.
I'm facing linker errors with QString::toStdWString when /Zc:wchar_t is set
like this: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __thiscall QString::toStdWString(void)const " [...] How can i use Qt with boost filesystem ?
Hello Surya, this really is a Qt issue. Using wchar_t as a native type you have to recompile Qt using the same compiler switch. There even is a bug in the tracker: http://bugreports.qt.nokia.com/browse/QTBUG-9617 In general, you will have to be very careful and do not mix wchar_t compiler settings in your projects as they will become incompatible. Regards, -- Christian Pfligersdorffer Software Engineering www.eos.info
participants (2)
-
Pfligersdorffer, Christian
-
Surya Kiran Gullapalli