PDA

View Full Version : Problem with qt creater and linker



themean
4th July 2012, 20:42
My platform is windows 7
I use last qt creator (2.5.0)
My issue is :


:-1: error: LNK1181: cannot open input file 'C:\libarchive\lib.obj'

My .pro is


#-------------------------------------------------
#
# Project created by QtCreator 2012-07-04T22:10:36
#
#-------------------------------------------------

QT -= core

QT -= gui

TARGET = libarchive
CONFIG += console
CONFIG -= app_bundle

LIBS += C:\libarchive\lib

LIBS += -larchive_static

INCLUDEPATH += C:\libarchive\include

TEMPLATE = app


SOURCES += main.cpp

When move lib in project directory and comment LIBS += C:\libarchive\lib it's work
What i'm doing wrong ??

ChrisW67
5th July 2012, 02:15
Lines 15 through 17:


LIBS += -LC:/libarchive/lib -larchive_static

Note the "-L". Also note the use of forward slashes; not essential, but it suppresses a warning about un-escaped backslashes.