AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
May 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2010.05.02 01:54 "qmake (Qt) and libtiff "undefined symbols" problem on mac (snow leopard).", by Dave Sun
2010.05.02 02:51 "Re: qmake (Qt) and libtiff "undefined symbols" problem on mac (snow leopard).", by Chris Cox
2010.05.02 11:39 "Re: qmake (Qt) and libtiff "undefined symbols" problem on mac (snow leopard).", by <hotdog.sun@gmail.com>
2010.05.02 12:25 "Re: qmake (Qt) and libtiff "undefined symbols" problem on mac (snow leopard).", by Toby Thain
2010.05.02 21:48 "Re: qmake (Qt) and libtiff "undefined symbols" problem on mac (snow leopard).", by Dmitry Fedorov

2010.05.02 21:48 "Re: qmake (Qt) and libtiff "undefined symbols" problem on mac (snow leopard).", by Dmitry Fedorov

Hi Dave,

If you installed Qt from the binary package from the official website
it comes in a 32 bit form as of a latest build. If you got a default
libtiff for your mac it should be 64 bit and thus different
architectures. The best idea there would be to rebuild qt for snow
leopard and cocoa (will take you an hour). Another problem might arise
if you did build Qt yourself as a universal binary, in this case you
would need to supply libtiff as a universal binary as well.

Dmitry


On Sat, May 1, 2010 at 6:54 PM, Dave Sun <hotdog.sun@gmail.com> wrote:
> Dear folks,
> I have problems using qmake to compile my simplest libtiff program. Here are
> the information about my system.
> computer:  Darwin Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST
> 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386
> Qt version: Qt 4.6.2
> libtiff version: 3.9.2
> operating system: snow leopard.
> Simplest program:
> #include <QtCore/QCoreApplication>
> #include "tiff.h"
> #include "tiffio.h"
> #include <iostream>
> int main(int argc, char *argv[])
> {
>     //QCoreApplication a(argc, argv);
>     TIFF* tif = TIFFOpen("foo.tif", "r");
>     if(tif == NULL)
>        std::cout << "could not open the file";
>     TIFFClose(tif);
>     //return a.exec();
> std::cout << "hello";
>     return 0;
> }
> my pro file:
> QT       -= gui
> TARGET = libtiffSimpleTest
> CONFIG   += console
> CONFIG   -= app_bundle
> TEMPLATE = app
> LIBS += -ltiff
> SOURCES += main.cpp
> I used Qt creator as my IDE. When I run compiling program I got the
> following error:
>
> ld: warning: in /usr/local/lib/libtiff.dylib, file is not of required
> architecture
>
> Undefined symbols:
>
> "_TIFFOpen", referenced from:
>
> _main in main.o
>
> ld: symbol(s) not found
>
> collect2: ld returned 1 exit status
>
> make: *** [libtiffSimpleTest] Error 1
>
> However, when I just use the following:
>
> g++ main.cpp -ltiff
>
> It works well. What is the problem here?
>
> Thank you.
>
> Dave
>
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/
>



-- 
__________________________________

Dmitry Fedorov Levit
  <dima@dimin.net> <http://www.dimin.net/>
Skype: dima_fedorov
Google: fedorov
__________________________________

Center for Bio-Image Informatics:
  <http://www.bioimage.ucsb.edu/>

Vision Research Lab, Electrical and Computer Engineering
Image Registration:
  <http://vision.ece.ucsb.edu/>
  <http://vision.ece.ucsb.edu/registration/demo/>
  <http://regima.dpi.inpe.br/>

University of California, Santa Barbara
_________________________________

DIMIN Viewer n5:
  <http://www.dimin.net/software/viewer/>
__________________________________