配置FreeImage静态库
来源:互联网 发布:pi实时数据库 编辑:程序博客网 时间:2024/05/16 13:51
配置FreeImage静态库:
1、从http://freeimage.sourceforge.net/download.html下载FreeImage源代码;
2、打开工程,只需要在Debug和Release两种模式下编译FreeImageLib项目,在FreeImage\Dist中生成FreeImaged.lib(Debug下)和FreeImage.lib(Release下);
3、打开你的工程,在工具--选项--项目和解决方案--VC++目录--包含文件和库文件中添加FreeImage.h和前面生成的两个lib文件;
4、在你的工程属性--配置属性--C/C++--预处理器--预处理器定义中添加FREEIMAGE_LIB;将代码生成--运行时库修改为多线程DLL(/MD)(Debug状态下为多线程调试DLL(/MDd));
5、在工程属性--配置属性--链接器--输入中添加FreeImaged.lib和FreeImage.lib;将忽略特定库修改为LIBCMT;
6、在你的程序开始处调用FreeImage_Initialise(),结束后调用FreeImage_DeInitialise(),编译你的工程;
Using FreeImage as a static library is not so easy, but it's not more complicated than using any other library. Here is a step by step method to do this :
1. Compile the FreeImage library in debug and release modes and close your projects. You won't need to use the FreeImage source code anymore.
Note: Do not compile the FreeImage DLL (project named FreeImage) but the project named FreeImageLib. This should produce a huge file named FreeImage.lib (in release mode) or FreeImaged.lib (in debug mode) in the Dist\ directory.
2. Copy FreeImage.lib/FreeImaged.lib into your lib\ directory or in a directory where the linker can find them (e.g. your project directory). You can use "Menu->Tools->Options->Directories->Library files" for this.
3. Create a new project and add your code in it.
Add a call to FreeImage_Initialise() at the beginning of you main function and a call to FreeImage_DeInitialise() at the end of this function.
4. Edit the compiler options (Menu -> Project -> Settings)
1. tab C/C++ : Category "Preprocessor"
* Add FREEIMAGE_LIB to the preprocessor definitions
2. tab C/C++ : Category "Code Generation"
* Use the Multithreaded run-time library (in release mode)
* Use the Debug Multithreaded run-time library (in debug mode)5. Edit linker options (Menu -> Project -> Settings)
1. tab Link : Category Input
* Add FreeImage.lib to the list of object/library modules (release mode)
* Add FreeImaged.lib to the list of object/library modules (debug mode)
2. tab Link : Category Input
* Add LIBCMT to the Ignore library list (it helps to avoid a warning)6. Compile and link your program.
- 配置FreeImage静态库
- freeImage静态库连接
- 使用FreeImage静态库的初始化
- iOS freeImage静态库编译(makefile)
- VS2012配置FreeImage
- FreeImage
- 图像处理库(FreeImage)
- FreeImage库HDR转JPEG
- 图像库OpenCV/FreeImage/CImg/CxImage
- 四大图像库:OpenCV/FreeImage/CImg/CxImage
- 四大图像库:OpenCV/FreeImage/CImg/CxImage
- 四大图像库:OpenCV/FreeImage/CImg/CxImage
- 四大图像库:OpenCV/FreeImage/CImg/CxImage
- 四大图像库:OpenCV/FreeImage/CImg/CxImage
- 四大图像库:OpenCV/FreeImage/CImg/CxImage
- 四大图像库:OpenCV/FreeImage/CImg/CxImage
- 使用Freeimage库时报错的解决方法
- 静态库路径配置
- 空间变换理论
- Swing:支持自动过滤的 JComboBox
- sql server中like无法匹配下划线问题解决方案
- 检测点9.3
- 关于魔兽CTM补丁太大,安装不下的问题的解决方案
- 配置FreeImage静态库
- VS2005无法创建智能手机工程的解决办法
- HTTP头信息中的参数Etag
- JS模态窗口
- Hello World——Linux汇编
- 走过的路
- LDD3学习笔记(9):高级字符驱动操作
- 网上找来的不错的Debian sources.list
- linux平台下oracle删除redolog仍然正常使用的原因