我正在尝试编译英特尔 Appup 示例程序“SlideshowexampleApplication”,它需要 Xmllite.lib。我搜索并发现我应该将此文件添加到 Visual Studio 2008 中的链接器选项,但我没有在项目属性->配置属性下看到链接器选项。我尝试将“C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include”添加为附加包含目录,但我仍然遇到编译错误。
Build started: Project: PicasaExampleComponent, Configuration: Debug Win32
Creating library...LINK : fatal error LNK1181: cannot open input file 'XMLLite\lib\XmlLite.lib'
这是示例项目: http://appdeveloper.intel.com/en-us/article/slideshow-example-windows
最佳答案
听起来示例应用程序正在使用库文件的相对路径,将 XMLLite\Lib 添加到库文件名之前。
这可能是 #pragma
的结果在示例应用程序代码中,您能否运行 findstr
在源代码上查看是否有任何对 XmlLite.lib
的引用?罢工>
<罢工> http://msdn.microsoft.com/en-us/library/7f0aews7(v=VS.100).aspx有关以这种方式使用的#pragma 的信息。
编辑: 实际上,此示例中的项目设置为引用随示例代码一起安装的 XmlLite:
G:\SlideshowExample>findstr /si xmllite.lib . PicasaExampleComponent\PicasaExampleComponent.vcproj: AdditionalDependencies="XMLLite\lib\XmlLite.lib" PicasaExampleComponent\PicasaExampleComponent.vcproj: AdditionalDependencies="XMLLite\lib\XmlLite.lib" PicasaExampleComponent\PicasaExampleComponent.vcxproj: XMLLite\lib\XmlLite.lib;%(AdditionalDependencies) PicasaExampleComponent\PicasaExampleComponent.vcxproj: XMLLite\lib\XmlLite.lib;%(AdditionalDependencies)
您可以使用那个,也可以获取已安装并正确包含 SDK 的那个。
关于c++ - 将 xmllite.lib 添加到 Visual Studio 2008,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4239867/