Qt 4.8.2, QtCreator 2.5.2, Win7 SP1, юникод, не могу слинковать статическую либу. pro-file | Код | #--------------------------------------------------------------------------- # # \file iTeacher.pro # \brief project file # #---------------------------------------------------------------------------
TARGET = iTeacher TEMPLATE = app QT = core gui sql network xml CONFIG += warn_on
win32 { INCLUDEPATH = "$$(xLib)/Project/Include"
CONFIG(debug, debug|release) { LIBS = "$$(xLib)/Build/Libs/VC++2010/Debug/StaticLib_VC++2010.lib" } else { LIBS = "$$(xLib)/Build/Libs/VC++2010/Release/StaticLib_VC++2010.lib" }
LIBS += User32.lib Ole32.lib Advapi32.lib shell32.lib } unix { INCLUDEPATH =
CONFIG(debug, debug|release) { LIBS = -lxlib_d } else { LIBS = -lxlib_r }
LIBS += }
HEADERS = Config.h \ QtLib/Common.h \ Classes/CUtils.h \ Classes/CSqlNavigator.h \ Classes/CCheckBoxItemDelegate.h \ Classes/CCenteredCheckBox.h \ Forms/CMain.h \ Forms/CWordEditor.h \ Forms/CWordFinder.h
SOURCES = main.cpp \ Classes/CUtils.cpp \ Classes/CSqlNavigator.cpp \ Classes/CCheckBoxItemDelegate.cpp \ Classes/CCenteredCheckBox.cpp \ Forms/CMain.cpp \ Forms/CWordEditor.cpp \ Forms/CWordFinder.cpp
FORMS = Forms/CMain.ui \ Forms/CWordEditor.ui \ Forms/CWordFinder.ui
RESOURCES = Resources/App.qrc
win32 { RC_FILE = Resources/App_win.rc } unix { RC_FILE = # n/a }
OUT_DIR =
CONFIG(debug, debug|release) { OUT_DIR = ./Build/Debug } else { OUT_DIR = ./Build/Release }
DESTDIR = "$$OUT_DIR/Distr" MOC_DIR = "$$OUT_DIR/Temp" OBJECTS_DIR = "$$OUT_DIR/Temp" RCC_DIR = "$$OUT_DIR/Temp" UI_DIR = "$$OUT_DIR/Ui"
|
Compile output: | Код | ...
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 -w34100 -w34189 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtCore" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtNetwork" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtGui" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtXml" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtSql" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include" -I"..\..\xLib\Project\Include" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\ActiveQt" -I"Build\Debug\Temp" -I"Build\Debug\Ui" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\mkspecs\win32-msvc2010" -FoBuild\Debug\Temp\ @C:\TEMP\moc_CMain.obj.6868.6895.jom moc_CMain.cpp cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 -w34100 -w34189 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtCore" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtNetwork" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtGui" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtXml" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtSql" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include" -I"..\..\xLib\Project\Include" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\ActiveQt" -I"Build\Debug\Temp" -I"Build\Debug\Ui" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\mkspecs\win32-msvc2010" -FoBuild\Debug\Temp\ @C:\TEMP\moc_CWordEditor.obj.6868.7067.jom moc_CWordEditor.cpp cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 -w34100 -w34189 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtCore" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtNetwork" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtGui" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtXml" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\QtSql" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include" -I"..\..\xLib\Project\Include" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\include\ActiveQt" -I"Build\Debug\Temp" -I"Build\Debug\Ui" -I"..\..\..\Libs\Qt\4.8.2_msvc2010\mkspecs\win32-msvc2010" -FoBuild\Debug\Temp\ @C:\TEMP\moc_CWordFinder.obj.6868.7114.jom moc_CWordFinder.cpp link /LIBPATH:"d:\Libs\Qt\4.8.2_msvc2010\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /MANIFEST /MANIFESTFILE:"./Build/Debug/Temp\iTeacher.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:Build\Debug\Distr\iTeacher.exe @C:\TEMP\iTeacher.exe.6868.9672.jom CMain.obj : error LNK2019: unresolved external symbol "public: static void __cdecl NxLib::CxDir::vCreateForce(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (?vCreateForce@CxDir@NxLib@@SAXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z) referenced in function "private: void __thiscall CMain::_initMain(void)" (?_initMain@CMain@@AAEXXZ) CMain.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __cdecl NxLib::CxPath::sExeDir(void)" (?sExeDir@CxPath@NxLib@@SA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ) referenced in function "private: void __thiscall CMain::_initMain(void)" (?_initMain@CMain@@AAEXXZ) CMain.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __cdecl NxLib::CxString::sFormatPercentage(unsigned __int64 const &,unsigned __int64 const &)" (?sFormatPercentage@CxString@NxLib@@SA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AB_K0@Z) referenced in function "private: void __thiscall CMain::slot_cboDictionaryPath_OnCurrentIndexChanged(class QString const &)" (?slot_cboDictionaryPath_OnCurrentIndexChanged@CMain@@AAEXABVQString@@@Z) CMain.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const NxLib::CxConst::xSLASH" (?xSLASH@CxConst@NxLib@@2V?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@B) CMain.obj : error LNK2019: unresolved external symbol "public: static void __cdecl NxLib::CxDir::vFindFiles(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,bool const &,class std::vector<class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >,class std::allocator<class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > > > *)" (?vFindFiles@CxDir@NxLib@@SAXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@0AB_NPAV?$vector@V?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@V?$allocator@V?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@@4@@Z) referenced in function "private: void __thiscall CMain::cboDictionaryPath_reload(void)" (?cboDictionaryPath_reload@CMain@@AAEXXZ) CMain.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl NxLib::CxDir::bIsExists(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (?bIsExists@CxDir@NxLib@@SA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z) referenced in function "private: void __thiscall CMain::cboDictionaryPath_reload(void)" (?cboDictionaryPath_reload@CMain@@AAEXXZ) Build\Debug\Distr\iTeacher.exe : fatal error LNK1120: 6 unresolved externals jom: D:\Projects\Qt\iTeacher\Makefile.Debug [Build\Debug\Distr\iTeacher.exe] Error 1120 jom: D:\Projects\Qt\iTeacher\Makefile [debug] Error 2 00:06:59: The process "D:\Soft\Coding\_C++\QtCreator\2.5.2\bin\jom.exe" exited with code 2. Error while building/deploying project iTeacher (target: Desktop) When executing step 'Make'
|
Ошибки: | Код | CMain.obj:-1: error: LNK2019: unresolved external symbol "public: static void __cdecl NxLib::CxDir::vCreateForce(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (?vCreateForce@CxDir@NxLib@@SAXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z) referenced in function "private: void __thiscall CMain::_initMain(void)" (?_initMain@CMain@@AAEXXZ)
CMain.obj:-1: error: LNK2019: unresolved external symbol "public: static class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __cdecl NxLib::CxPath::sExeDir(void)" (?sExeDir@CxPath@NxLib@@SA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ) referenced in function "private: void __thiscall CMain::_initMain(void)" (?_initMain@CMain@@AAEXXZ)
...
|
Т.е. не линкуються моя статическая либа, либу собирал с поддержкой юникода (Use Unicode Character Set). Меня вот это смущает: | Код | ... class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > ...
|
Почему unsigned short, а не wchar_t ? Что-то нашел по-поводу "build-in type", но до конца не разобрался в чеm дело. Это сообщение отредактировал(а) Alca - 29.11.2012, 01:22
|