在 Adobe XMP SDK 中找不到 SXMPMeta
cannot find SXMPMeta in Adobe XMP SDK
我正在尝试编写一个简单的Qt小部件应用程序,它允许我读写。XMP文件使用Qt框架和Adobe XMP SDK在OS X 10.10上。
我是一个菜鸟,绝不是C++专业 (并且拥有C++和Qt的基本/中级自学知识,这意味着我在尝试做某事时依赖谷歌,有时最终会使用坏习惯或可以简化的代码)
- 我已经从Adobe下载并构建了XMP SDK,并构建了部分示例
(由于某种原因,我无法构建其他的,但现在这不是那么重要)。
-
我已经构建了静态的64位版本的库(libXMPCoreStatic.a &&libXMPFilesStatic.h)
-
与公共文件夹中的包含文件夹一起,我将它们放在Qt Widget App项目的文件夹中,放入子文件夹框架中
-
我已将库链接到我的项目(在我的 .pro 文件中):
LIBS += -L$$PWD/XMPFramework/ -lXMPCoreStatic LIBS += -lXMPFilesStatic INCLUDEPATH += $$PWD/XMPFramework/include/ DEPENDPATH += $$PWD/XMPFramework/ PRE_TARGETDEPS += $$PWD/XMPFramework/libXMPCoreStatic.a PRE_TARGETDEPS += $$PWD/XMPFramework/libXMPFilesStatic.a
-
我已经在我的应用程序中包含了 XMP(基本应用程序仅用于测试我是否可以连接和使用 XMP SDK 的一些基础知识) - 主窗口.cpp :
#include "mainwindow.h" #include "ui_mainwindow.h" #include <cstdio> #include <string> #include <cstring> #define MAC_ENV 1 //don't know why, but when I don't explicitly //define this, then the app won't build // Must be defined to instantiate template classes //#define TXMP_STRING_TYPE std::string //when used, I get whole range of errors, there's a sample at the end of the question // Must be defined to give access to XMPFiles #define XMP_INCLUDE_XMPFILES 1 #include <XMP.incl_cpp> //XMP INCLUDE #include <XMP.hpp> //XMP INCLUDE MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); //this if is taken from the sample code //for the SDK, the problem is that //my project does not know the SXMPMeta //but seems to know at least part of the SDK //because at least part of the classes and methods //are visible through the intellisense if(!SXMPMeta::Initialize()) { //the project does not react to SXMPMeta //and does not know it, even though the //XCode project I've built from the SDK's samples //seems to be ok ... } } ...the rest omitted for brevity...
您是否看到我犯的一些错误或SXMPMeta类不存在的原因?
我尝试使用#define TXMP_STRING_TYPE std::string
时遇到的错误示例。我的想法是它与模板化 XMP 类的初始化有关
Undefined symbols for architecture x86_64:
"_CFBundleCopyExecutableArchitectures", referenced from:
XMP_PLUGIN::IsValidLibrary(std::string const&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFBundleCopyResourceURL", referenced from:
XMP_PLUGIN::GetResourceDataFromModule(__CFBundle*, std::string const&, std::string const&, std::string&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFBundleCreate", referenced from:
XMP_PLUGIN::IsValidLibrary(std::string const&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
XMP_PLUGIN::LoadModule(std::string const&, bool) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFBundleGetFunctionPointerForName", referenced from:
XMP_PLUGIN::GetFunctionPointerFromModuleImpl(__CFBundle*, char const*) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFBundleIsExecutableLoaded", referenced from:
XMP_PLUGIN::LoadModule(std::string const&, bool) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFBundleLoadExecutableAndReturnError", referenced from:
XMP_PLUGIN::LoadModule(std::string const&, bool) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFDataGetBytes", referenced from:
XMP_PLUGIN::GetResourceDataFromModule(__CFBundle*, std::string const&, std::string const&, std::string&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFNumberGetValue", referenced from:
XMP_PLUGIN::GetResourceDataFromModule(__CFBundle*, std::string const&, std::string const&, std::string&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFRelease", referenced from:
XMP_PLUGIN::IsValidLibrary(std::string const&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
XMP_PLUGIN::LoadModule(std::string const&, bool) in libXMPFilesStatic.a(OS_Utils_Mac.o)
XMP_PLUGIN::UnloadModule(__CFBundle*, bool) in libXMPFilesStatic.a(OS_Utils_Mac.o)
XMP_PLUGIN::GetFunctionPointerFromModuleImpl(__CFBundle*, char const*) in libXMPFilesStatic.a(OS_Utils_Mac.o)
XMP_PLUGIN::GetResourceDataFromModule(__CFBundle*, std::string const&, std::string const&, std::string&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFStringCreateWithCString", referenced from:
XMP_PLUGIN::GetFunctionPointerFromModuleImpl(__CFBundle*, char const*) in libXMPFilesStatic.a(OS_Utils_Mac.o)
XMP_PLUGIN::GetResourceDataFromModule(__CFBundle*, std::string const&, std::string const&, std::string&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFURLCreateDataAndPropertiesFromResource", referenced from:
XMP_PLUGIN::GetResourceDataFromModule(__CFBundle*, std::string const&, std::string const&, std::string&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
"_CFURLCreateFromFileSystemRepresentation", referenced from:
XMP_PLUGIN::IsValidLibrary(std::string const&) in libXMPFilesStatic.a(OS_Utils_Mac.o)
When executing step 'Make'
TXMPFiles
是一个模板。SXMPFiles
TXMPFiles<std::string>
.XMP 工具包 2016.07 示例之一的开头显示了以下代码:
// Must be defined to instantiate template classes
#define TXMP_STRING_TYPE std::string
// Must be defined to give access to XMPFiles
#define XMP_INCLUDE_XMPFILES 1
// Ensure XMP templates are instantiated
#include "public/include/XMP.incl_cpp"
// Provide access to the API
#include "public/include/XMP.hpp"
相关文章:
- std::map<struct,struct>::find 找不到匹配项,但是如果我循环通过 begin() 到 end(),我在那里看到匹配项
- 找不到成员对象:没有名为get_event()的成员,也处理多态性和向量
- 为什么野牛仍在使用"int yylex(void)",却找不到"int yylex(YYS
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- 找不到QtResource文件中的文件
- VC++本机单元测试,找不到调试符号
- RegGetValue在当前用户下找不到名称
- 带有 -stdlib=libc++ 的 clang++ 9.0.1 找不到<optional>
- c++找不到具有相同哈希的无序集合元素
- 找不到以下加速库:boost_fiber
- 找不到 FLTK(缺少:FLTK_INCLUDE_DIR)
- 设置 Visual Studio for MPI: 找不到标识符错误
- "assimp/config.h"找不到,但它在文件夹中
- 链接器找不到在虚拟类 c++ 中访问的静态字段的符号
- C++系统找不到指定的文件错误
- FindPackageHandleStandardArgs.cmake:137 的 CMake 错误(消息):找不到 Boost (缺少:正则表达式)(找到合适的版本"1.72.0",
- vcpkg 添加新库,但找不到
- Qt 5.11.2 (Clang 8.0 (Apple), 64 位), 找不到 QJSEngine 文件
- 在 Adobe XMP SDK 中找不到 SXMPMeta