Results 1 to 18 of 18

Thread: QtAxWidget link error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2012
    Posts
    13
    Thanks
    1

    Smile QtAxWidget link error

    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?

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QtAxWidget link error

    Quote Originally Posted by ArnaudC View Post
    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.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Dec 2012
    Posts
    13
    Thanks
    1

    Default Re: QtAxWidget link error

    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.

    Qt Code:
    1. #include <ActiveQt/QAxWidget>
    2.  
    3. LeoValidatorGUI::LeoValidatorGUI(QWidget *parent, Qt::WFlags flags)
    4. : QMainWindow(parent, flags)
    5. {
    6. ui.setupUi(this);
    7. ...
    8. QAxWidget *window = new QAxWidget();
    9. window->setControl("HKEY_CLASSES_ROOT\TypeLib\{ACFC5869-1D0F-4E2C-B898-05805607D542}"); // ClassID of the COM object
    10. window->show();
    11. ...
    12. }
    To copy to clipboard, switch view to plain text mode 


    Then, as I tols you I work with Visual, so in Project properties > Linker > input > Additional Dependencies, I've got :
    Qt Code:
    1. LeoEngine.lib
    2. kernel32.lib
    3. user32.lib
    4. shell32.lib
    5. uuid.lib
    6. ole32.lib
    7. ws2_32.lib
    8. gdi32.lib
    9. comdlg32.lib
    10. oleaut32.lib
    11. libboost_filesystem-vc100-mt-sgd-1_49.lib
    12. cgmlib_mt.lib
    13. CgmObjectsRW_mt.lib
    14. freetype2_mt.lib
    15. zlib_mt.lib
    16. imm32.lib
    17. winmm.lib
    18. winspool.lib
    19. qtmaind.lib
    20. QtCored.lib
    21. QtGuid.lib
    22. QAxContainerd.lib
    23. QAxContainer.lib
    To copy to clipboard, switch view to plain text mode 

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

    if I do a
    Qt Code:
    1. ECHO $(QTDIR)
    To copy to clipboard, switch view to plain text mode 

    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 :
    Qt Code:
    1. /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
    To copy to clipboard, switch view to plain text mode 

    and when I look into Linker > Command Line, I've got :
    Qt Code:
    1. /OUT:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Debug\\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\Debug\LeoValidatorGUI.pdb" /SUBSYSTEM:WINDOWS /PGD:"C:\Users\acasella\Documents\AnteaDev\Leo\Win32\Debug\LeoValidatorGUI.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE
    To copy to clipboard, switch view to plain text mode 



    Do you need other information?

  4. #4
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QtAxWidget link error

    this is in your linker command:
    "QAxContainerd.lib" "QAxContainer.lib"

    You are linking with both release and debug!
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. moc link error
    By Zalwou06 in forum Qt Programming
    Replies: 3
    Last Post: 13th September 2012, 03:03
  2. Qt4 with MySQLon Win XP link error
    By FumblesMacStupid in forum Newbie
    Replies: 0
    Last Post: 7th May 2011, 19:17
  3. Replies: 11
    Last Post: 5th May 2011, 14:05
  4. Link error
    By emrares in forum Qt Programming
    Replies: 1
    Last Post: 12th November 2010, 13:45
  5. moc link error
    By user_mail07 in forum Qt Programming
    Replies: 3
    Last Post: 3rd July 2007, 19:30

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.