简体   繁体   English

VS2012的libtiff

[英]libtiff with VS2012

I am trying to use libtiff 4.0.3 on VS2012 x64, and I got error for my code: 我试图在VS2012 x64上使用libtiff 4.0.3,但我的代码出现错误:

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. 下载libtiff 4.0.3,并将其编译以生成库。 Everything needed/generated(.h, .lib, .dll, ...) is in D:\\myProject|tools\\libtiff\\ folder. 所需/生成的所有内容(.h,.lib,.dll等)都位于D:\\ myProject | tools \\ libtiff \\文件夹中。

  2. Open VS2012 and start a new C++ dll project 打开VS2012并启动一个新的C ++ dll项目

  3. Project > Properties > C/C++ > Additional Include Directories, added "D:\\myProject|tools\\libtiff\\" 项目>属性> C / C ++>其他包含目录,添加了“ D:\\ myProject | tools \\ libtiff \\”

  4. Project > Properties > Linker > Additional library directories, added "D:\\myProject|tools\\libtiff\\" 项目>属性>链接器>其他库目录,添加了“ D:\\ myProject | tools \\ libtiff \\”

  5. Project > Properties > Linker > Input > Additional Dependencies, added libtiff.lib 项目>属性>链接器>输入>其他依赖项,添加了libtiff.lib

  6. In my .cpp file, added #include "tiff.h" and #include "tiffio.h" 在我的.cpp文件中,添加了#include“ tiff.h”和#include“ tiffio.h”

Finally, my code generation is Multi-threaded Debug DLL (/MDd) 最后,我的代码生成是多线程调试DLL(/ MDd)

I don't know what else I should do. 我不知道该怎么办。 Anyone has any idea how I can make it work? 任何人都知道如何使它起作用吗?

尝试使用visuall studio自己的本机x64命令窗口为VS x64应用程序构建libtiff。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM