Results 1 to 2 of 2

Thread: Problem with qt creater and linker

  1. #1
    Join Date
    Apr 2012
    Posts
    10
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem with qt creater and linker

    My platform is windows 7
    I use last qt creator (2.5.0)
    My issue is :
    Qt Code:
    1. :-1: error: LNK1181: cannot open input file 'C:\libarchive\lib.obj'
    To copy to clipboard, switch view to plain text mode 
    My .pro is
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2012-07-04T22:10:36
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT -= core
    8.  
    9. QT -= gui
    10.  
    11. TARGET = libarchive
    12. CONFIG += console
    13. CONFIG -= app_bundle
    14.  
    15. LIBS += C:\libarchive\lib
    16.  
    17. LIBS += -larchive_static
    18.  
    19. INCLUDEPATH += C:\libarchive\include
    20.  
    21. TEMPLATE = app
    22.  
    23.  
    24. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 
    When move lib in project directory and comment LIBS += C:\libarchive\lib it's work
    What i'm doing wrong ??

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Problem with qt creater and linker

    Lines 15 through 17:
    Qt Code:
    1. LIBS += -LC:/libarchive/lib -larchive_static
    To copy to clipboard, switch view to plain text mode 
    Note the "-L". Also note the use of forward slashes; not essential, but it suppresses a warning about un-escaped backslashes.

  3. The following user says thank you to ChrisW67 for this useful post:

    themean (5th July 2012)

Similar Threads

  1. Replies: 2
    Last Post: 6th March 2012, 10:47
  2. Colibri Board -> Windows CE (Custom SDK) -> Qt 4.7.3 -> LINKER Problem!! :/
    By snospmis_eht in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 6th May 2011, 17:16
  3. The QT creater doesn't on every restart on linux 64 bit machine.
    By parag3gwl in forum Installation and Deployment
    Replies: 0
    Last Post: 5th January 2011, 08:14
  4. Linker problem - xrender
    By GrahamLabdon in forum Installation and Deployment
    Replies: 1
    Last Post: 19th November 2010, 17:42
  5. Linker problem
    By vels in forum Qt Programming
    Replies: 4
    Last Post: 8th April 2010, 15:40

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.