windows x64 利用VS的libtiff下载编译与使用

下载

libtif 下载网址 libtif
windows 下载.zip 版本,本方法适用于4.2.0及之前的版本。因为4.2.0之后的zip里.vc文件没了。
下载并且解压。

编译

利用VS, 进行编译
在开始菜单里,找到VS的目录,根据自己的电脑选择终端。如果选择的是Develop Command Prompt for VS 2022终端进行编译的话,默认结果是32位的。64位系统选x64 Native Tools Command Prompt for VS 2022。

终端里进入下载解压后的libtif位置。
例如:

cd D:\Programs\tiff-4.2.0

在此文件夹下编译:

nmake -f Makefile.vc

编译后在子文件夹libtiff下可得到.dll .lib 等一系列新文件:
![[Pasted image 20240506162206.png]]

调用

VS中进入需要调用libtif库的项目。
项目右键,属性。

  1. 包含外部库总文件夹(C/C+±—常规----“附加包含目录”)
    编辑----新行,点击右边的省略号按钮,选择刚刚得到.dll所在的文件夹,其他添加目录操作同。
    ![[Pasted image 20240506212555.png]]

![[Pasted image 20240506212640.png]]

  1. 包含库文件夹(链接器----常规----附加库目录)
    ![[Pasted image 20240506212853.png]]

  2. 包含外部库文件(链接器——输入——“附加依赖项”)
    ![[Pasted image 20240506212910.png]]

  3. 附加(项目——属性——VC++目录——“包含目录”)

  4. 附加(项目——属性——VC++目录——“库目录”)
    ![[Pasted image 20240506212939.png]]

即可正常编译运行。
另外,如果一开始编译成了32位后程序build 报错,重新在原位置重新编译后,VS中不必重新添加链接。

参考

https://blog.csdn.net/Mr_yangsc/article/details/129521078

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
支持GPL协议: one line to give the program\'s name and an idea of what it does. Copyright (C) Ports Project 2007/01/30 horse_b This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.      horse_b 研究了6年代码跨平台移植项目,可以做大部分项目的移植,在这里的项目大部分是GPL工程 所以大家得到我的PORTS工程以后,也请尊重GPL协议   文件列表: libpcap-cygwin-port.tar.gz libnet-cygwin-port.tar.gz libtiff-cygwin-port.tar.gz libtiff-mingw-port.tar.gz libtiff-vc-vs.net-port.rar 说明: 所有这些PORTS项目都是horse_b的个人制作,2001年我为NIDS系统软件SNORT项目做了一个WIN32-Port的项目, 应该比SNORT作者出win32 port要早半年,但是我没有公开过这个WIN32 PORT,这个项目的WIN32 的二进制程序 在黑客网站黑白中可以找到 http://www.yiii.net/app/club/view.jsp?Information_Id=I00014317 抓包驱动snort182drv.zip http://www.yiii.net/app/club/view.jsp?Information_Id=I00014560 ids.zip 请大家尊重我的劳动,不允许任意改动我做的PORTS项目,用要做PORTS项目的,请发邮件和我联系 如果有人和我讨论移植和开发编译器,可以来信和我讨论: 我的专门接受此类问题的EMAIL: winddk64@gmail.com 或者 winddk64@163.com       技术下载区 Libpcap cygwin port下载:    libpcap-cygwin-port.tar.gz libnet cygwin port下载: libnet-cygwin-port.tar.gz   libtiff cygwin port下载: libtiff-cygwin-port.tar.gz libtiff mingw port下载: libnet-mingw-port.tar.gz (这个工程我觉得有VC和VS。NET的PORT了,我就没做这个PORT,有人要这个PORT,可以和我联系,半天就能搞定了) libtiff vc++&

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值