PDA

View Full Version : QtAxWidget link error



ArnaudC
14th December 2012, 15:27
Hello everyone,
I'm working on a Qt program and I have to use an ActiveX control. So I wanted to use QAxWidget but when I do this, I have :
error LNK2019: unresolved external symbol "public: bool __thiscall QAxBase::setControl
error LNK2019: unresolved external symbol "public: __thiscall QAxWidget::QAxWidget

I checked that QAxContainer.lib and QAxContainerd.lib were in my input properties (I use Visual 2010). And that's it, those .lib are in the good folder, I don't understand why it doesn't work.

Someone can help me? :)

amleto
14th December 2012, 18:31
I checked that QAxContainer.lib and QAxContainerd.lib were in my input properties (I use Visual 2010). And that's it, those .lib are in the good folder, I don't understand why it doesn't work.

Someone can help me? :)

We can't take your word for it. Post a small example code that causes the problem. State explicitly (i.e. absolute paths!) what your library include locations () AND libs are.

Post your compiler + linker command.

ArnaudC
17th December 2012, 08:44
yes sorry.
I (Arnaud), work for a technical communication company. We are trying to make a software that uses a viewer with a activeX Control. So for that I need a QtAxWidget.



#include <ActiveQt/QAxWidget>

LeoValidatorGUI::LeoValidatorGUI(QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
{
ui.setupUi(this);
...
QAxWidget *window = new QAxWidget();
window->setControl("HKEY_CLASSES_ROOT\TypeLib\{ACFC5869-1D0F-4E2C-B898-05805607D542}"); // ClassID of the COM object
window->show();
...
}




Then, as I tols you I work with Visual, so in Project properties > Linker > input > Additional Dependencies, I've got :


LeoEngine.lib
kernel32.lib
user32.lib
shell32.lib
uuid.lib
ole32.lib
ws2_32.lib
gdi32.lib
comdlg32.lib
oleaut32.lib
libboost_filesystem-vc100-mt-sgd-1_49.lib
cgmlib_mt.lib
CgmObjectsRW_mt.lib
freetype2_mt.lib
zlib_mt.lib
imm32.lib
winmm.lib
winspool.lib
qtmaind.lib
QtCored.lib
QtGuid.lib
QAxContainerd.lib
QAxContainer.lib


in Linker > General > Additional Library Directories :
$(QTDIR)\lib

if I do a


ECHO $(QTDIR)


I have C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2, which is rigth with to my Qt directory
Then I checked in C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2\lib and there are : QAxContainerd.lib and QAxContainer.lib


and when I look into C/C++ > Command Line, I've got :


/I".\GeneratedFiles" /I"." /I"C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2\include" /I".\GeneratedFiles\Debug" /I"C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2\include\QtCore" /I"C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2\include\QtGui" /I"..\LeoEngine\include" /I"..\LeoEngine\boost_1_45_0" /I"..\LeoEngine\tinyxml" /I"..\LeoEngine\include\CgmObjects" /I".\include" /Zi /nologo /W1 /WX- /Od /Oy- /D "UNICODE" /D "WIN32" /D "QT_LARGEFILE_SUPPORT" /D "QT_CORE_LIB" /D "QT_GUI_LIB" /Gm- /EHsc /MTd /GS /fp:precise /Zc:wchar_t- /Zc:forScope /Fp"Debug\LeoValidatorGUI.pch" /Fa"Debug\" /Fo"Debug\" /Fd"Debug\vc100.pdb" /Gd /analyze- /errorReport:queue


and when I look into Linker > Command Line, I've got :


/OUT:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Deb ug\\LeoValidatorGUI.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2\lib" /LIBPATH:"./lib" /LIBPATH:"../LeoEngine/lib/Debug/win32" "LeoEngine.lib" "kernel32.lib" "user32.lib" "shell32.lib" "uuid.lib" "ole32.lib" "ws2_32.lib" "gdi32.lib" "comdlg32.lib" "oleaut32.lib" "libboost_filesystem-vc100-mt-sgd-1_49.lib" "cgmlib_mt.lib" "CgmObjectsRW_mt.lib" "freetype2_mt.lib" "zlib_mt.lib" "imm32.lib" "winmm.lib" "winspool.lib" "qtmaind.lib" "QtCored.lib" "QtGuid.lib" "QAxContainerd.lib" "QAxContainer.lib" "advapi32.lib" "odbc32.lib" "odbccp32.lib" /MANIFEST /ManifestFile:"Debug\LeoValidatorGUI.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Deb ug\LeoValidatorGUI.pdb" /SUBSYSTEM:WINDOWS /PGD:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Deb ug\LeoValidatorGUI.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE




Do you need other information?

amleto
17th December 2012, 12:50
this is in your linker command:
"QAxContainerd.lib" "QAxContainer.lib"

You are linking with both release and debug!

ArnaudC
17th December 2012, 14:57
Yes it doesn't work with only QAxContainerd.lib

It doesnt work with only QAxContainer.lib too, same error.

Added after 5 minutes:

for exemple, if I do this :
[Code]
/OUT:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Deb ug\\LeoValidatorGUI.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2\lib" /LIBPATH:"./lib" /LIBPATH:"../LeoEngine/lib/Debug/win32" "LeoEngine.lib" "kernel32.lib" "user32.lib" "shell32.lib" "uuid.lib" "ole32.lib" "ws2_32.lib" "gdi32.lib" "comdlg32.lib" "oleaut32.lib" "libboost_filesystem-vc100-mt-sgd-1_49.lib" "cgmlib_mt.lib" "CgmObjectsRW_mt.lib" "freetype2_mt.lib" "zlib_mt.lib" "imm32.lib" "winmm.lib" "winspool.lib" "qtmaind.lib" "QtCored.lib" "QtGuid.lib" "QAxContainer.lib" "advapi32.lib" "odbc32.lib" "odbccp32.lib" /MANIFEST /ManifestFile:"Debug\LeoValidatorGUI.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Deb ug\LeoValidatorGUI.pdb" /SUBSYSTEM:WINDOWS /PGD:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Deb ug\LeoValidatorGUI.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE
[Code]

d_stranz
17th December 2012, 16:23
You can't link to both Debug and Release versions of a library at the same time in Visual Studio. The two versions are incompatible, because VS inserts extra code into Debug libraries (for debugging purposes) that makes a debug and a release version of the same object different and incompatible.

So in your link statement above, you have the release version of QAxContainer.lib, not the debug version, and this won't work.

By the way, the tags are "CODE" and "/CODE" (inside of "[]" brackets), not "[Code]"

ArnaudC
17th December 2012, 16:55
no sorry I copied the wrong one, but I did the same with QAxContainerd.lib of course.



Yes it doesn't work with only QAxContainerd.lib
It doesnt work with only QAxContainer.lib too, same error.



thank you for the trick ;)

d_stranz
17th December 2012, 18:54
What do you mean, you "copied the wrong one"? Everything in that link line refers to Debug versions of libraries except QAxContainer.lib. If you mean to say that you used QAxContainerd.lib with a Release build, well that won't work either.

By the way, I notice that you do not have "QT_DLL" defined on your C/C++ command line. You may need this to get proper linkage from the QT DLLs. Go to the project properties, C/C++ Preprocessor settings, and add QT_DLL to the Preprocessor Definitions line. (This is on VC 2008; the name in VC 2010 might be different, but for sure there will be something similar). This define is required whenever you are using Qt as DLLs in a project to ensure that the class declarations are imported with the correct name-mangling. (A different define is used internally by Qt when building the Qt DLLs themselves).

ArnaudC
18th December 2012, 10:46
Woooow, I tried with the QT_DLL flag, it threw me a lot of errors!!



1>ErrorManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall QString::toStdString(void)const " (__imp_?toStdString@QString@@QBE?AV?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "private: class TiXmlElement * __thiscall ErrorManager::buildExportHeader(class TiXmlDocument * const)" (?buildExportHeader@ErrorManager@@AAEPAVTiXmlEleme nt@@QAVTiXmlDocument@@@Z)
1>leovalidatorgui.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall QString::toStdString(void)const " (__imp_?toStdString@QString@@QBE?AV?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>XMLProfileListReader.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall QString::toStdString(void)const " (__imp_?toStdString@QString@@QBE?AV?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>ErrorManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::append(class QByteArray const &)" (__imp_?append@QString@@QAEAAV1@ABVQByteArray@@@Z) referenced in function "private: void __thiscall ErrorManager::addToFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?addToFile@ErrorManager@@AAEXV?$basic_string@DU?$ char_traits@D@std@@V?$allocator@D@2@@std@@0_N@Z)
1>leovalidatorgui.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::append(class QByteArray const &)" (__imp_?append@QString@@QAEAAV1@ABVQByteArray@@@Z)
1>ErrorManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(char const *)" (__imp_??0QString@@QAE@PBD@Z) referenced in function "private: void __thiscall ErrorManager::addToFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?addToFile@ErrorManager@@AAEXV?$basic_string@DU?$ char_traits@D@std@@V?$allocator@D@2@@std@@0_N@Z)
1>leovalidatorgui.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(char const *)" (__imp_??0QString@@QAE@PBD@Z)
1>XMLProfileListReader.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(char const *)" (__imp_??0QString@@QAE@PBD@Z)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QTreeWidgetItem::setTextAlignment(int,int)" (__imp_?setTextAlignment@QTreeWidgetItem@@QAEXHH@Z ) referenced in function "public: void __thiscall Ui_LeoValidatorGUIClass::setupUi(class QMainWindow *)" (?setupUi@Ui_LeoValidatorGUIClass@@QAEXPAVQMainWin dow@@@Z)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QString::operator!=(char const *)const " (__imp_??9QString@@QBE_NPBD@Z) referenced in function "public: void __thiscall LeoValidatorGUI::selectAutoFolder(void)" (?selectAutoFolder@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QFileDialog::~QFileDialog(void)" (__imp_??1QFileDialog@@UAE@XZ) referenced in function "public: void __thiscall LeoValidatorGUI::chooseFolderPath(void)" (?chooseFolderPath@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QFileDialog::getExistingDirectory(class QWidget *,class QString const &,class QString const &,class QFlags<enum QFileDialog::Option>)" (__imp_?getExistingDirectory@QFileDialog@@SA?AVQSt ring@@PAVQWidget@@ABV2@1V?$QFlags@W4Option@QFileDi alog@@@@@Z) referenced in function "public: void __thiscall LeoValidatorGUI::chooseFolderPath(void)" (?chooseFolderPath@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QFileDialog::QFileDialog(class QWidget *,class QString const &,class QString const &,class QString const &)" (__imp_??0QFileDialog@@QAE@PAVQWidget@@ABVQString@ @11@Z) referenced in function "public: void __thiscall LeoValidatorGUI::chooseFolderPath(void)" (?chooseFolderPath@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QFileDialog::getOpenFileName(class QWidget *,class QString const &,class QString const &,class QString const &,class QString *,class QFlags<enum QFileDialog::Option>)" (__imp_?getOpenFileName@QFileDialog@@SA?AVQString@ @PAVQWidget@@ABV2@11PAV2@V?$QFlags@W4Option@QFileD ialog@@@@@Z) referenced in function "public: void __thiscall LeoValidatorGUI::chooseListPath(void)" (?chooseListPath@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(struct QString::Null const &)" (__imp_??0QString@@QAE@ABUNull@0@@Z) referenced in function "public: void __thiscall LeoValidatorGUI::chooseListPath(void)" (?chooseListPath@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QString::operator==(char const *)const " (__imp_??8QString@@QBE_NPBD@Z) referenced in function "public: void __thiscall LeoValidatorGUI::updateFilesList(void)" (?updateFilesList@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::append(char const *)" (__imp_?append@QString@@QAEAAV1@PBD@Z) referenced in function "public: void __thiscall LeoValidatorGUI::watchInFolder(void)" (?watchInFolder@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QTreeWidgetItem::text(int)const " (__imp_?text@QTreeWidgetItem@@QBE?AVQString@@H@Z) referenced in function "private: class QStringList __thiscall LeoValidatorGUI::getFileListFromTree(void)" (?getFileListFromTree@LeoValidatorGUI@@AAE?AVQStri ngList@@XZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QListWidget::addItem(class QString const &)" (__imp_?addItem@QListWidget@@QAEXABVQString@@@Z) referenced in function "public: void __thiscall LeoValidatorGUI::showFile(void)" (?showFile@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QTableWidgetItem::text(void)const " (__imp_?text@QTableWidgetItem@@QBE?AVQString@@XZ) referenced in function "public: void __thiscall LeoValidatorGUI::showFile(void)" (?showFile@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromStdString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?fromStdString@QString@@SA?AV1@ABV?$basic_s tring@DU?$char_traits@D@std@@V?$allocator@D@2@@std @@@Z) referenced in function "public: void __thiscall LeoValidatorGUI::chooseCGMPath(void)" (?chooseCGMPath@LeoValidatorGUI@@QAEXXZ)
1>leovalidatorgui.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(char const *)" (__imp_??4QString@@QAEAAV0@PBD@Z) referenced in function "private: bool __thiscall LeoValidatorGUI::validateCGM(class QStr


(and by the way, I meant that the QAxContainerd.lib in DEBUG didn't work, even when I don't use QAxContainer.lib)

d_stranz
18th December 2012, 16:42
Hmm, did you rebuild the entire project using the define? Was your Qt distribution built using the QT_MAKEDLL define? Is your LeoEngine a Qt-dependent library?

I would suggest that you back up, make a simple GUI project that uses only QtCore and QtGui, and get *that* to link properly, then add ActiveQt to that, *then* try pulling in all of your other libraries etc. If you want to avoid link errors, everything has to be built with the same linkage to Qt.

ArnaudC
18th December 2012, 17:01
First, Thank you for your help, I move foward thank to this.

I did a "test" project with almost nothing in it (a basic Qt app from Visual), I add to this the QAxContainerd.lib.

This is the code I have :


viewtest::viewtest(QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
{
ui.setupUi(this);

QAxWidget *window = new QAxWidget();
window->setControl("HKEY_CLASSES_ROOT\TypeLib\{ACFC5869-1D0F-4E2C-B898-05805607D542}");
window->show();
}



but I still have the same error :


1>viewtest.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QAxBase::setControl(class QString const &)" (?setControl@QAxBase@@QAE_NABVQString@@@Z) referenced in function "public: __thiscall viewtest::viewtest(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0viewtest@@QAE@PAVQWidget@@V?$QFlags@W4WindowTy pe@Qt@@@@@Z)
1>viewtest.obj : error LNK2019: unresolved external symbol "public: __thiscall QAxWidget::QAxWidget(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0QAxWidget@@QAE@PAVQWidget@@V?$QFlags@W4WindowT ype@Qt@@@@@Z) referenced in function "public: __thiscall viewtest::viewtest(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0viewtest@@QAE@PAVQWidget@@V?$QFlags@W4WindowTy pe@Qt@@@@@Z)
1>C:\Users\acasella\Documents\Visual Studio 2010\Projects\testActiveX\Win32\Debug\\viewtest.ex e : fatal error LNK1120: 2 unresolved externals


(here is the compilation command :


/OUT:"C:\Users\acasella\Documents\Visual Studio 2010\Projects\testActiveX\Win32\Debug\\viewtest.ex e" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Qt\4.8.2\qt-everywhere-opensource-src-4.8.2\lib" "kernel32.lib" "user32.lib" "shell32.lib" "uuid.lib" "ole32.lib" "advapi32.lib" "ws2_32.lib" "gdi32.lib" "comdlg32.lib" "oleaut32.lib" "imm32.lib" "winmm.lib" "winspool.lib" "qtmaind.lib" "QtCored.lib" "QtGuid.lib" "QAxContainerd.lib" "odbc32.lib" "odbccp32.lib" /MANIFEST /ManifestFile:"Debug\viewtest.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\acasella\Documents\Visual Studio 2010\Projects\testActiveX\Win32\Debug\viewtest.pdb" /SUBSYSTEM:WINDOWS /PGD:"C:\Users\acasella\Documents\Visual Studio 2010\Projects\testActiveX\Win32\Debug\viewtest.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE

)


Then,

did you rebuild the entire project using the define
Yes, Absolutely.


Was your Qt distribution built using the QT_MAKEDLL define?
How can I check that?


Is your LeoEngine a Qt-dependent library?
no Qt in the LeoEngine

Thank you very much.

d_stranz
18th December 2012, 22:53
"public: bool __thiscall QAxBase::setControl

Something is fishy with this linkage. I would expect to see "__stdcall" or something like that. I am starting to wonder if there is some preprocessor define required to use ActiveQt. Have you looked at the example and demo projects that come with Qt to see what they look like?

ArnaudC
19th December 2012, 11:44
The Qt sample in visual only shows how to build a activeX controler (server) and it works, but this is not what I want to do. I want to use one.
If you were thinking at other samples, tell me and I'll check.
And yes I saw a QAXSERVER preprocessor define, but if I add it to my test project, it still doesn't work. I trying to find another define only for the use of activeX controlers.

d_stranz
20th December 2012, 16:33
OK, I have made a little project that opens an Excel workspace in a QMainWindow. This is a VS 2008 project, but you should be able to import it into VS 2010. If this doesn't work for you, then I think there is probably something wrong with your Qt installation.


8523

8522

ArnaudC
21st December 2012, 09:06
NIIIIICE!! Thank you very much!

and it doesn't work
AxFoo.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QAxBase::setControl(class QString const &)" (?setControl@QAxBase@@QAE_NABVQString@@@Z) referenced in function "public: __thiscall AxFoo::AxFoo(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0AxFoo@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@ Qt@@@@@Z)
1>AxFoo.obj : error LNK2019: unresolved external symbol "public: __thiscall QAxWidget::QAxWidget(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0QAxWidget@@QAE@PAVQWidget@@V?$QFlags@W4WindowT ype@Qt@@@@@Z) referenced in function "public: __thiscall AxFoo::AxFoo(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0AxFoo@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@ Qt@@@@@Z)
1>QtCored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol _WSAAsyncSelect@16 referenced in function "public: void __thiscall QEventDispatcherWin32Private::doWsaAsyncSelect(int )" (?doWsaAsyncSelect@QEventDispatcherWin32Private@@Q AEXH@Z)
1>QtGuid.lib(qaccessible_win.obj) : error LNK2019: unresolved external symbol __imp__PlaySoundW@12 referenced in function "public: static void __cdecl QAccessible::updateAccessibility(class QObject *,int,enum QAccessible::Event)" (?updateAccessibility@QAccessible@@SAXPAVQObject@@ HW4Event@1@@Z)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmSetCandidateWindow@8 referenced in function "public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmSetCompositionWindow@8 referenced in function "public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmSetCompositionFontW@8 referenced in function "public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmGetContext@4 referenced in function "struct HIMC__ * __cdecl getContext(struct HWND__ *)" (?getContext@@YAPAUHIMC__@@PAUHWND__@@@Z)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmReleaseContext@8 referenced in function "void __cdecl releaseContext(struct HWND__ *,struct HIMC__ *)" (?releaseContext@@YAXPAUHWND__@@PAUHIMC__@@@Z)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmNotifyIME@16 referenced in function "void __cdecl notifyIME(struct HIMC__ *,unsigned long,unsigned long,unsigned long)" (?notifyIME@@YAXPAUHIMC__@@KKK@Z)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmGetCompositionStringW@16 referenced in function "long __cdecl getCompositionString(struct HIMC__ *,unsigned long,void *,unsigned long)" (?getCompositionString@@YAJPAUHIMC__@@KPAXK@Z)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmAssociateContext@8 referenced in function "void __cdecl enableIme(class QWidget *,bool)" (?enableIme@@YAXPAVQWidget@@_N@Z)
1>QtGuid.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmGetDefaultIMEWnd@4 referenced in function "struct HWND__ * __cdecl getDefaultIMEWnd(struct HWND__ *)" (?getDefaultIMEWnd@@YAPAUHWND__@@PAU1@@Z)
1>C:\Users\acasella\Downloads\AxFoo\Debug\AxFoo.exe : fatal error LNK1120: 13 unresolved externals

sooo yes, it's seemed to be a pbm of installation. I had to compile Qt sources for visual 2010, maybe I did something wrong. I try to do it again, and I tell you.

d_stranz
21st December 2012, 18:24
Might be better to just download the binaries from qt-project.org. I am pretty sure they have 4.8 binaries pre-built for VS 2010.

ArnaudC
15th January 2013, 11:11
Ok, just for you to know I needed to compile QT for my computer, now the error is gone.
Thank you everyone.

amleto
15th January 2013, 11:38
well no sh!t Sherlock. That's (normally) the first thing you have to do when using Qt :-/