Qt creator 2.8.1 and Qt4.8.5, Windows libtiff
-
[quote author="SGaist" date="1379272096"]Are you sure your path goes to the folder where tiff.lib and tiffd.lib are located ?
If you are using QtCreator, your can right-click on your project and use the Add Library function and you'll just have to follow the wizard.[/quote]
Hi, this is what i use add lib function :
win32: LIBS += -L$$PWD/C:/Program Files (x86)/tiff-3.9.4/libtiff/ -llibtiff
INCLUDEPATH += $$PWD/C:/Program Files (x86)/tiff-3.9.4/libtiff
DEPENDPATH += $$PWD/C:/Program Files (x86)/tiff-3.9.4/libtiffit is right..? i do not think ...
-
No it's not, $$PWD should not be there and the paths should be quoted.
Did you try the example I wrote ?
-
[quote author="SGaist" date="1379282182"]No it's not, $$PWD should not be there and the paths should be quoted.
Did you try the example I wrote ?[/quote]
I have tried you written code. if building the error :
:-1: Fehler:cannot find -ltiffd
:-1: Fehler:collect2: ld returned 1 exit status
then i repaced -ltiffd with -llibtiffd, the error stays still:
:-1: Fehler:cannot find -llibtiffd
:-1: Fehler:collect2: ld returned 1 exit statusi went back to have a look the location of the .lib file, under the path
C:/Program Files (x86)/tiff-3.9.4/libtiff
there are a libtiff.lib, libtiff_i.lib and libtiff.dllhow could i continue to configure....?
thanks
-
AFAICS you don't have libtiffd so link to libtiff
-
[quote author="SGaist" date="1379282182"]No it's not, $$PWD should not be there and the paths should be quoted.
Did you try the example I wrote ?[/quote]
right. i linkend in debug with -ltiff, it seems works but still an error:
C:\Program Files (x86)\tiff-3.9.4\libtiff\libtiff.dll:-1: Fehler:file not recognized: File format not recognized+
this error means a bad dll file or? -
When does this error happen ?
-
Can you show your complete pro file ?
-
[quote author="SGaist" date="1379451486"]Can you show your complete pro file ?[/quote]
hi, this is:
#-------------------------------------------------
Project created by QtCreator 2013-09-03T20:35:28
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = js_v21
TEMPLATE = appSOURCES += main.cpp
mainwindow.cpp
GUI.cpp
makeDNG.cppHEADERS += mainwindow.h
GUI.h
makeDNG.hFORMS += mainwindow.ui
win32 {
LIBS += -L$$quote(C:/Program Files (x86)/tiff-3.9.4/libtiff)
CONFIG(release, debug|release): LIBS += -ltiff
CONFIG(debug, debug|release): LIBS += -ltiff
} -
I just forgot one basic question... What architecture are you building for ?
-
[quote author="SGaist" date="1379489392"]I just forgot one basic question... What architecture are you building for ?[/quote]
Hi thanks for the help.
as stated when i built it said the libtiff.dll has a not recoginized format.
then i downloaded a libtiff,dll from internet and put it in the directory and now it works.
thanks.
but i still would like ask what does -ltiff mean? it means on linking, linkt to libtiff.dll? so what is the principle to write such thing?thanks again...
-
-ltiff means: link to the library file named tiff.lib.
On windows lib files are either static library (containing the actual library code) or stub files containing the information needed for the link phase, the dll being loaded at run time.
-
[quote author="SGaist" date="1379533471"]-ltiff means: link to the library file named tiff.lib.
On windows lib files are either static library (containing the actual library code) or stub files containing the information needed for the link phase, the dll being loaded at run time.[/quote]
but there is no a file called tiff.lib in the install path only a file called libtiff.lib.....
-
then use -llibtiff.
tiff vs libtiff is more a naming convention issue between VS libraries and gnu libraries