Results 1 to 4 of 4

Thread: How to Call .dll from Qt5.4

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2015
    Posts
    35
    Qt products
    Qt5
    Platforms
    MacOS X Windows
    Thanks
    20

    Default How to Call .dll from Qt5.4

    Hello,

    I started a project call dll from Qt C++.

    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by Qt5.4 at Windows 7 32bit
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT += core
    8. QT -= gui
    9.  
    10. TARGET = CallDll
    11. CONFIG += console
    12. CONFIG -= app_bundle
    13.  
    14. TEMPLATE = app
    15.  
    16.  
    17. SOURCES += main.cpp
    18. LIBS += "C:/Qt-Lessons/CallDll/libzinnia.dll"
    19.  
    20. HEADERS += \
    21. zinnia.h
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. #include <QCoreApplication>
    2. #include <QDebug>
    3. #include "zinnia.h"
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. QCoreApplication a(argc, argv);
    8.  
    9. zinnia::Recognizer *recognizer = zinnia::Recognizer::create();
    10. if (!recognizer->open("c:/handwriting-zh_CN.model")) {
    11. qDebug() << recognizer->what();
    12.  
    13. }
    14.  
    15. return a.exec();
    16. }
    To copy to clipboard, switch view to plain text mode 

    I also copied libzinnia.dll to my project, debug, release folders and add LIBS in .pro file

    But when I build project, compiler gave errors :
    undefined reference to ..........

    How can I fix it?

    Thanks
    Last edited by anda_skoa; 19th March 2015 at 13:41. Reason: changed [quote] to [code]

Similar Threads

  1. Replies: 6
    Last Post: 3rd December 2012, 07:26
  2. how to call mfc dll in Qt
    By gauravg in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2011, 20:42
  3. how to call mfc dll from Qt
    By gauravg in forum Qt Programming
    Replies: 1
    Last Post: 16th November 2011, 07:18
  4. call a class
    By assismvla in forum Newbie
    Replies: 3
    Last Post: 24th May 2010, 12:57
  5. how to call mfc dll use qt?
    By yunpeng880 in forum Qt Programming
    Replies: 2
    Last Post: 12th March 2009, 04:32

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.