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
June 2006

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

2006.06.27 06:55 "linker error", by Malathi P
2006.06.27 18:35 "Re: linker error", by Bernie Pallek

2006.06.27 18:35 "Re: linker error", by Bernie Pallek

> i downloaded gnuwin32 and starts working with tiff in 
> vc++6.0,but its  giving an error at runtime,plz somebody help 
> me out...
> 
> iam posting my code and the run time errors too
> 
> this s very simple appln,but nt yet working,plz help me out...
> 
> #include<tiffio.h>
> #include<iostream.h>
> void main()
> {
>  TIFF *t=TIFFOpen("C:\3.tif","r");
>  TIFFClose(t);
> }
> 
> in vc++
> 
> --------------------Configuration: prj - Win32 
> Debug--------------------
> Linking...
> open.obj : error LNK2001: unresolved external symbol _TIFFClose
> open.obj : error LNK2001: unresolved external symbol _TIFFOpen
> Debug/prj.exe : fatal error LNK1120: 2 unresolved externals
> Error executing link.exe.
> prj.exe - 3 error(s), 0 warning(s)

Firstly, it's important to note that you have NOT in fact got runtime
errors, as you haven't made it far enough to actually run the program.  ;-) 
You do have a build error, however, and it's easily solved (probably).

My guess is that you have built libtiff, but you haven't actually linked its
libraries to your application.  To do this, edit your project
settings/properties, and find a setting (probably under "linking" or
something similar) that allows you specify external/3rd-party libraries to
link to your app.  You should add the libtiff stub, named by default,
libtiff_i.lib.  Don't forget to move/copy libtiff.dll to the same place
where your executable (prj.exe) will end up.

Alternately, you can just link libtiff.lib (a static version of the library)
to your app, and then you don't need to mess about with the DLL.