Hello,
I have a static library written in objective-c++ that wraps some c++ code. When I include the .a file in my Xamarin.iOS project, I'm getting several "Undefined Symbols" errors.
"std::terminate()", referenced from:
CAbsFile::Create(C3gvStr) in libInigmaWrapper.a(AbsFile.o)
CAbsDataFile::Create(C3gvStr) in libInigmaWrapper.a(AbsFile.o)
CAbsFile::Open(C3gvStr) in libInigmaWrapper.a(AbsFile.o)
CAbsDataFile::Open(C3gvStr) in libInigmaWrapper.a(AbsFile.o)
CAbsFile::GetSettingsFileName() in libInigmaWrapper.a(AbsFile.o)
CAbsFile::GetHistoryFileName() in libInigmaWrapper.a(AbsFile.o)
CAbsFile::GetFavouritesFileName() in libInigmaWrapper.a(AbsFile.o)
Several StackOverflow questions say I should statically link in the standard C++ libraries in my wrapper project using -lstdc++ to my "Other Linker Flags", but for me that results in an error.
/Users/erikkerber/Desktop/SSD/SSD-Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lstdc++
So what is the preferred way to get these Standard C++ libraries linked into my Xamarin.iOS project? For reference, here is my LinkWith attribute.
[assembly: LinkWith ("libWrapper.a", LinkTarget.ArmV7, IsCxx=true, Frameworks="UIKit CoreVideo CoreMedia AVFoundation Foundation CoreGraphics", ForceLoad = true)]
Thanks in advance!