Results 1 to 10 of 10

Thread: How do to add a library to my project?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How do to add a library to my project?

    Simply connect the *. dll - not using QLibrary IMHO

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How do to add a library to my project?

    can you show us you *.pro file?
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  3. #3
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How do to add a library to my project?

    here : http://www.prog.org.ru/topic_8259_0.html

    PS: Google translator to help

  4. #4
    Join Date
    Aug 2009
    Location
    United States
    Posts
    45
    Thanks
    20
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do to add a library to my project?

    Faldżip, thanks so much for helping. Here's my .pro file:
    Qt Code:
    1. SOURCES += main.cpp \
    2. mainwindow.cpp \
    3. baction.cpp \
    4. caction.cpp \
    5. arrowbutton.cpp
    6. HEADERS += main.h \
    7. mainwindow.h \
    8. baction.h \
    9. caction.h \
    10. arrowbutton.h
    11. OTHER_FILES += readme.txt
    12.  
    13. INCLUDEPATH += C:\Users\Nathan\Desktop\qextserialport
    14. LIBS += -LC:\Users\Nathan\Desktop\qextserialport -lqextserialport
    15.  
    16. CONFIG(debug, debug|release):LIBS += -lqextserialportd
    17. CONFIG(release, debug|release):LIBS += -lqextserialport
    To copy to clipboard, switch view to plain text mode 

    The paths I put in there are to this folder: http://www.roboticsguy.com/qextserialport.zip

    I'm really over my head here, I've never used DLLs before and have no idea what I'm doing I really appreciate your time and any advice you could give me.

  5. #5
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How do to add a library to my project?

    Qt Code:
    1. LIBS += -LC:\Users\Nathan\Desktop\qextserialport -lqextserialport
    2.  
    3. CONFIG(debug, debug|release):LIBS += -lqextserialportd
    4. CONFIG(release, debug|release):LIBS += -lqextserialport
    To copy to clipboard, switch view to plain text mode 
    in debug version you are linking to both versions of library... so remove -lqextserialport from the first line I pasted.
    What does it mean it is not working? What errors you get? Are you using MinGW or VisualStudio?
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. plugin in a library
    By alisami in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2008, 17:21
  2. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  3. Library and Subdirs building problem
    By herenbdy in forum Qt Programming
    Replies: 2
    Last Post: 10th July 2008, 02:10
  4. Replies: 1
    Last Post: 5th March 2007, 20:50
  5. CMake and pthreads
    By Matt Smith in forum General Discussion
    Replies: 5
    Last Post: 3rd September 2006, 20:42

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.