2005.11.03 18:52 "[Tiff] Unresolved external '_TIFFDefaultStripSize' referenced from C:\..\file.obj", by Letícia Alves Ferreira

2005.11.04 07:35 "Re: [Tiff] Unresolved external '_TIFFDefaultStripSize' referenced from C:\..\file.obj", by Øåáåêî Åâãåíèé

Hi guys,

I´m having this problem after building my project. I want to get a bitmap file and convert it into a tiff file, but the compiler (bcc5.0) returned me these error mesaages:

[Linker Error] Unresolved external '_TIFFDefaultStripSize' referenced from C:\..\filebmptotiff.OBJ

[Linker Error] Unresolved external '_TIFFSetField' referenced from C:\..\filebmptotiff.OBJ

[Linker Error] Unresolved external '_TIFFWriteScanline' referenced from C:\..\filebmptotiff.OBJ

[Linker Error] Unresolved external '_TIFFWriteDirectory' referenced from C:\..\filebmptotiff.OBJ[Linker Error] Unresolved external '_TIFFOpen' referenced from C:\..\filebmptotiff.OBJ [Linker Error] Unresolved external '_TIFFClose' referenced from C:\..\filebmptotiff.OBJ

I´ve already included libtiff.lib(vers 3.7.3) in my project using project options and also as below:

#include <vcl.h>
#pragma hdrstop
USERES("MCEToolRSPlus.res");
USEFORM("Intro.cpp", formMCETool);
USEFORM("aboutMCE.cpp", AboutBox);
USEFORM("QuestDialogAVI.cpp", OKBottomDlg);
USEUNIT("filebmptotiff.cpp");
USE("filebmptotiff.h", File);
USELIB("libtiff.lib"); //this line.

What can I do to solve this problem?? Does anyone have a clue?

It is not a problem of libtiff.

1.

Maybe problem because libtiff builded using MSVC and you try to used under BCC.

The best solution is to rebuild libtiff under BCC.

If libtiff builded as static library it is the only one solution. In case of dll it's guaranties that libtiff and you project will use same memory managment.

If you don't like to rebuild libtiff you could use coff2omf utility from BCC distributive.

Like this:
link /lib /convert libpokr.lib
coff2omf -v libpokr.lib libpokr1.lib
move libpokr1.lib libpokr.lib

But it work only for dynamic libraries and you have two different memory managment.

2. Try to add lib in your .lib file directly. You can add library files to project like .cpp files.