Symbol not found when using template defined in a library
I'm trying to use the adobe xmp library in an iOS application but I'm
getting link errors. I have the appropriate headers and libraries in my
path, but I'm getting link errors. I double-checked to make sure the
headers and library are on my path. I checked the mangled names of the
methods, but they aren't in the library (I checked using the nm command).
What am I doing wrong?
Library Header:
#if defined ( TXMP_STRING_TYPE )
#include "TXMPMeta.hpp"
#include "TXMPIterator.hpp"
#include "TXMPUtils.hpp"
typedef class TXMPMeta <TXMP_STRING_TYPE> SXMPMeta; // For
client convenience.
typedef class TXMPIterator <TXMP_STRING_TYPE> SXMPIterator;
typedef class TXMPUtils <TXMP_STRING_TYPE> SXMPUtils;
.mm file:
#include <string>
using namespace std;
#define IOS_ENV
#define TXMP_STRING_TYPE string
#import "XMP.hpp"
void DoStuff()
{
SXMPMeta meta;
string returnValue;
meta.SetProperty ( kXMP_NS_PDF, "goformz", "{ formId: {guid} }" );
meta.DumpObject(DumpToString, &returnValue);
}
Link Errors:
(null): "TXMPMeta<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > >::DumpObject(int
(*)(void*, char const*, unsigned int), void*) const", referenced from:
(null): "TXMPMeta<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > >::TXMPMeta()",
referenced from:
(null): "TXMPMeta<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >
>::SetProperty(char const*, char const*, char const*, unsigned int)",
referenced from:
(null): "TXMPMeta<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > >::~TXMPMeta()",
referenced from:
(null): Linker command failed with exit code 1 (use -v to see invocation)
No comments:
Post a Comment