码迷,mamicode.com
首页 > Windows程序 > 详细

dng_SDK build win7

时间:2014-10-22 18:13:27      阅读:969      评论:0      收藏:0      [点我收藏+]

标签:win7   vs2010   x64 编译build dng_skd   

搞了两三天dng_sdk 程序,总算是搞定了,主要是validate程序,我用的是win7系统,VS2010,x64编译平台,方法如下:

1.dng_sdk下载网址:http://helpx.adobe.com/photoshop/digital-negative.html, DNG SDK win,解压缩后dng_sdk、JPEG_ReadMe.txt、XMP_ReadMe.txt三个文件;

2.按JPEG_ReadMe.txt文件里面的说明下载解压,重命名文件,与dng_sdk做兄弟文件;

3.按XMP_ReadMe.txt说明下载解压重命名文件,同样与dng_sdk做兄弟文件,编译方法参照上一篇博客文章,在上一篇博客文件编译的基础上需要编译XMPCore和XMPFiles两个工程的静态和动态库:

XMPCore:xmp-sdk  XMPCore build vc10 dynamic windows_x64 打开XMPCore64.sln 工程编译会在../xmp_sdk\public\libraries\windows_x64\Debug中生成相应.dll和.lib库

XMPFiles: xmp_sdk\XMPFiles\build\vc10\dynamic\windows_x64打开XMPFiles64.sln工程编译也会在../xmp_sdk\public\libraries\windows_x64\Debug中生成相应.dll和.lib库

4.至此准备工作做完了,打开\dng_sdk\projects\win\dng_sdk.sln工程,会出现Microsoft Visual Studio提示的未能正确加载解决方案中的一个或多个项目。有关详细信息,请参见“输出”窗口,直接确定就行了,输出窗口会出现D:\DNGcode\xmp_sdk\build\vc\XMPFiles.vcxproj : error  : 未能找到项目“D:\DNGcode\xmp_sdk\build\vc\XMPFiles.vcxproj”。

D:\DNGcode\xmp_sdk\build\vc\XMPFiles.vcxproj : error  : 未能找到项目“D:\DNGcode\xmp_sdk\build\vc\XMPCore.vcxproj”。两个错误,本工程只编译validate,不用管它即可,编译程序,会出现如下错误:

5.缺少JCONFIG.H文件,在网站http://pan.baidu.com/share/link?shareid=1968959567&uk=858054856上下载添加在重新命名的libjpeg文件中即可

6.继续编译出现的错误为:

2>dng_image_writer.obj : error LNK2019: 无法解析的外部符号 compress2,该符号在函数 "protected: virtual void __cdecl dng_image_writer::WriteData(class dng_host &,class dng_ifd const &,class dng_stream &,class dng_pixel_buffer &,class AutoPtr<class dng_memory_block> &)" (?WriteData@dng_image_writer@@MEAAXAEAVdng_host@@AEBVdng_ifd@@AEAVdng_stream@@AEAVdng_pixel_buffer@@AEAV?$AutoPtr@Vdng_memory_block@@@@@Z) 中被引用
2>dng_read_image.obj : error LNK2019: 无法解析的外部符号 uncompress,该符号在函数 "protected: virtual void __cdecl dng_read_image::ReadTile(class dng_host &,class dng_ifd const &,class dng_stream &,class dng_image &,class dng_rect const &,unsigned int,unsigned int,unsigned int,class AutoPtr<class dng_memory_block> &,class AutoPtr<class dng_memory_block> &,class AutoPtr<class dng_memory_block> &)" (?ReadTile@dng_read_image@@MEAAXAEAVdng_host@@AEBVdng_ifd@@AEAVdng_stream@@AEAVdng_image@@AEBVdng_rect@@IIIAEAV?$AutoPtr@Vdng_memory_block@@@@55@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_GetVersionInfo_1,该符号在函数 "public: static void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::GetVersionInfo(struct XMP_VersionInfo *)" (?GetVersionInfo@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SAXPEAUXMP_VersionInfo@@@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_Initialize_2,该符号在函数 "public: static bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::Initialize(unsigned long,char const *,char const *)" (?Initialize@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SA_NKPEBD0@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_Initialize_1,该符号在函数 "public: static bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::Initialize(unsigned long)" (?Initialize@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SA_NK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_Terminate_1,该符号在函数 "public: static void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::Terminate(void)" (?Terminate@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SAXXZ) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_IncrementRefCount_1,该符号在函数 "public: __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(struct __XMPFiles__ *)" (??0?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA@PEAU__XMPFiles__@@@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_CTor_1,该符号在函数 "struct __XMPFiles__ * __cdecl Default_CTor(void)" (?Default_CTor@@YAPEAU__XMPFiles__@@XZ) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_DecrementRefCount_1,该符号在函数 "public: virtual __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::~TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(void)" (??1?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@UEAA@XZ) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_GetFormatInfo_1,该符号在函数 "public: static bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::GetFormatInfo(unsigned long,unsigned long *)" (?GetFormatInfo@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SA_NKPEAK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_CheckFileFormat_1,该符号在函数 "public: static unsigned long __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::CheckFileFormat(char const *)" (?CheckFileFormat@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SAKPEBD@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_CheckPackageFormat_1,该符号在函数 "public: static unsigned long __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::CheckPackageFormat(char const *)" (?CheckPackageFormat@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SAKPEBD@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_GetFileModDate_1,该符号在函数 "public: static bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::GetFileModDate(char const *,struct XMP_DateTime *,unsigned long *,unsigned long)" (?GetFileModDate@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SA_NPEBDPEAUXMP_DateTime@@PEAKK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_GetAssociatedResources_1,该符号在函数 "public: static bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::GetAssociatedResources(char const *,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *,unsigned long,unsigned long)" (?GetAssociatedResources@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SA_NPEBDPEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@KK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_IsMetadataWritable_1,该符号在函数 "public: static bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::IsMetadataWritable(char const *,bool *,unsigned long,unsigned long)" (?IsMetadataWritable@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SA_NPEBDPEA_NKK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_OpenFile_2,该符号在函数 "public: bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::OpenFile(class XMP_IO *,unsigned long,unsigned long)" (?OpenFile@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA_NPEAVXMP_IO@@KK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_OpenFile_1,该符号在函数 "public: bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::OpenFile(char const *,unsigned long,unsigned long)" (?OpenFile@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA_NPEBDKK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_CloseFile_1,该符号在函数 "public: void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::CloseFile(unsigned long)" (?CloseFile@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAAXK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_GetFileInfo_1,该符号在函数 "public: bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::GetFileInfo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,unsigned long *,unsigned long *,unsigned long *)" (?GetFileInfo@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAK11@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_SetAbortProc_1,该符号在函数 "public: void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::SetAbortProc(bool (__cdecl*)(void *),void *)" (?SetAbortProc@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAAXP6A_NPEAX@Z0@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_GetXMP_1,该符号在函数 "public: bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::GetXMP(class TXMPMeta<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,struct XMP_PacketInfo *)" (?GetXMP@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA_NPEAV?$TXMPMeta@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAUXMP_PacketInfo@@@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_PutXMP_1,该符号在函数 "public: void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::PutXMP(char const *,unsigned long)" (?PutXMP@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAAXPEBDK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_CanPutXMP_1,该符号在函数 "public: bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::CanPutXMP(char const *,unsigned long)" (?CanPutXMP@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA_NPEBDK@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_SetDefaultProgressCallback_1,该符号在函数 "public: static void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::SetDefaultProgressCallback(bool (__cdecl*)(void *,float,float,float),void *,float,bool)" (?SetDefaultProgressCallback@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SAXP6A_NPEAXMMM@Z0M_N@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_SetProgressCallback_1,该符号在函数 "public: void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::SetProgressCallback(bool (__cdecl*)(void *,float,float,float),void *,float,bool)" (?SetProgressCallback@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAAXP6A_NPEAXMMM@Z0M_N@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_SetDefaultErrorCallback_1,该符号在函数 "public: static void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::SetDefaultErrorCallback(bool (__cdecl*)(void *,char const *,unsigned char,long,char const *),void *,unsigned long)" (?SetDefaultErrorCallback@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SAXP6A_NPEAXPEBDEJ1@Z0K@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_SetErrorCallback_1,该符号在函数 "public: void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::SetErrorCallback(bool (__cdecl*)(void *,char const *,unsigned char,long,char const *),void *,unsigned long)" (?SetErrorCallback@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAAXP6A_NPEAXPEBDEJ1@Z0K@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_ResetErrorCallbackLimit_1,该符号在函数 "public: void __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::ResetErrorCallbackLimit(unsigned long)" (?ResetErrorCallbackLimit@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAAXK@Z) 中被引用
2>..\..\..\targets\win\debug64\dng_validate.exe : fatal error LNK1120: 28 个无法解析的外部命令

原因是validate工程没有添加XMPCore和XMPFiles两个工程的静态库,添加方法如下dng_validate工程右键-属性-配置属性-链接器-输入-附加依赖项编辑粘贴D:\DNGcode\xmp_sdk\public\libraries\windows_x64\Debug\XMPCore.lib

7. D:\DNGcode\xmp_sdk\public\libraries\windows_x64\Debug\XMPFiles.lib两个lib库确定-应用-使可写-确定,编译之后会遇到下面的错误

1>  CMake does not need to re-run because D:\DNGcode\xmp_sdk\XMPCore\build\vc10\dynamic\windows_x64\CMakeFiles\generate.stamp is up-to-date.
1>  XMPCore.vcxproj -> D:\DNGcode\xmp_sdk\public\libraries\windows_x64\Debug\XMPCore.dll
2>------ 已启动生成: 项目: dng_validate, 配置: Validate Debug x64 ------
2>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1422,5): warning : The referenced project ‘..\..\..\..\xmp_sdk\build\vc\XMPFiles.vcxproj‘ does not exist.
2>dng_image_writer.obj : error LNK2019: 无法解析的外部符号 compress2,该符号在函数 "protected: virtual void __cdecl dng_image_writer::WriteData(class dng_host &,class dng_ifd const &,class dng_stream &,class dng_pixel_buffer &,class AutoPtr<class dng_memory_block> &)" (?WriteData@dng_image_writer@@MEAAXAEAVdng_host@@AEBVdng_ifd@@AEAVdng_stream@@AEAVdng_pixel_buffer@@AEAV?$AutoPtr@Vdng_memory_block@@@@@Z) 中被引用
2>dng_read_image.obj : error LNK2019: 无法解析的外部符号 uncompress,该符号在函数 "protected: virtual void __cdecl dng_read_image::ReadTile(class dng_host &,class dng_ifd const &,class dng_stream &,class dng_image &,class dng_rect const &,unsigned int,unsigned int,unsigned int,class AutoPtr<class dng_memory_block> &,class AutoPtr<class dng_memory_block> &,class AutoPtr<class dng_memory_block> &)" (?ReadTile@dng_read_image@@MEAAXAEAVdng_host@@AEBVdng_ifd@@AEAVdng_stream@@AEAVdng_image@@AEBVdng_rect@@IIIAEAV?$AutoPtr@Vdng_memory_block@@@@55@Z) 中被引用
2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_OpenFile_2,该符号在函数 "public: bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::OpenFile(class XMP_IO *,unsigned long,unsigned long)" (?OpenFile@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA_NPEAVXMP_IO@@KK@Z) 中被引用
2>..\..\..\targets\win\debug64\dng_validate.exe : fatal error LNK1120: 3 个无法解析的外部命令

原因是没有把lib的文件夹的文件加载到工程,解决方法dng_validate工程右键-添加-新建筛选器(即新建个文件夹)我命名为zlib,将zlib文件中的文件加载进来即可zlib右键-添加-现有项-路径\third-party\zlib-全选-添加

8.添加完文件后继续编译会出现:2>dng_xmp_sdk.obj : error LNK2019: 无法解析的外部符号 WXMPFiles_OpenFile_2,该符号在函数 "public: bool __cdecl TXMPFiles<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::OpenFile(class XMP_IO *,unsigned long,unsigned long)" (?OpenFile@?$TXMPFiles@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QEAA_NPEAVXMP_IO@@KK@Z) 中被引用
2>..\..\..\targets\win\debug64\dng_validate.exe : fatal error LNK1120: 1 个无法解析的外部命令

这个错误,解决方法为打开dng-sdk文件夹里面的dng_xmp_sdk.cpp文件,找到文件的第49行,并注销,如://#define XMP_StaticBuild 1

9.解决完上面的错误编译我这就没有问题了,运行出现dng_validate.exe-系统错误 无法启动此程序,因为计算机中丢失XMPcore.dll。尝试重新安装该程序以解决此问题,解决方法dng—valate工程右键-属性-配置属性-常规-输出目录找到此工程生成exe文件的路径,本工程的为..\..\..\targets\win\debug64\,打开文件夹并将D:\DNGcode\xmp_sdk\public\libraries\windows_x64\Debug中的XMPCore.dll和XMPFiles.dll两个dll文件粘贴到此

再编译运行就正确了。


dng_SDK build win7

标签:win7   vs2010   x64 编译build dng_skd   

原文地址:http://blog.csdn.net/zhangchunbo135246/article/details/40378835

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!