AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2014.02.10 18:28 "[Tiff] libtiff with VS2012", by Nick X. Tsui
2014.02.10 19:33 "Re: [Tiff] libtiff with VS2012", by Jürgen_Buchmüller
2014.02.10 20:07 "Re: [Tiff] libtiff with VS2012", by Nick X. Tsui

2014.02.10 18:28 "[Tiff] libtiff with VS2012", by Nick X. Tsui

Dear LibTiff Users:

I am trying to use libtiff 4.0.3 on VS2012, and I got error for my code:

*Here is the code:*

long SaveTIFF(wchar_t *filePathAndName, char * pMemoryBuffer, long
width, long height){
    TIFF *out= TIFFOpenW(filePathAndName, "w");
        ret TURE;}

*Here is the rror:*

error LNK2019: unresolved external symbol TIFFOpenW referenced in
function "long __cdecl SaveTIFF(wchar_t *,char *,long,long)"
(?SaveTIFF@@YAJPEA_WPEADJJ@Z)

*Here is what I have done:*

1.

Download libtiff 4.0.3, and compile it to generate libraries. Everything needed/generated(.h, .lib, .dll, ...) is in D:\myProject|tools\libtiff\ folder.

2.

Open VS2012 and start a new C++ dll project
3.

Project > Properties > C/C++ > Additional Include Directories, added "D:\myProject|tools\libtiff\"

4.

Project > Properties > Linker > Additional library directories, added "D:\myProject|tools\libtiff\"

5.

Project > Properties > Linker > Input > Additional Dependencies, added libtiff.lib

6.

In my .cpp file, added #include "tiff.h" and #include "tiffio.h"

Finally, my code generation is *Multi-threaded Debug DLL (/MDd)*

I don't know what else I should do. Anyone has any idea how I can make it
work? Thanks.

Best.

Nick