The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (Archicad API, BIMx API, BIMcloud API) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, rmasaki, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

By abrakadabra
#305810
Dear Support,

I have the following linking problem when I try to compile for AC23 on OSX.

Environment:
Xcode 9.3
SDK 10.13


Showing All Messages
"ODB::FieldType const& ODB::GetFieldType<GS::Guid>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<GS::String>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<GS::UniString>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<ODB::Id>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<bool>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<char>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<double>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<float>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<unsigned char>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<int>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<unsigned int>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<short>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<unsigned short>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<long long>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
"ODB::FieldType const& ODB::GetFieldType<unsigned long long>()", referenced from:
__GLOBAL__sub_I_ACAPlib.c in libACAP_STAT.a(ACAPlib.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What could be the reason of this error?

Regards,
By abrakadabra
#305811
Linking command:

Ld /Users/myuser/Library/Developer/Xcode/DerivedData/MyProjectPM-fhuurgdjlzytvhghgexdurdptuwa/Build/Products/Release/MyProjectPM23.apx/Contents/MacOS/MyProjectPM23 normal x86_64
cd /work/MyProject2020/xcode
export MACOSX_DEPLOYMENT_TARGET=10.13
/Users/myuser/Downloads/Xcode\ 4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -bundle -isysroot /Users/myuser/Downloads/Xcode\ 4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/myuser/Library/Developer/Xcode/DerivedData/MyProjectPM-fhuurgdjlzytvhghgexdurdptuwa/Build/Products/Release -L../externals/ACMac23.3006/Lib/Mactel -L../lib/mac -L../lib/mac/Release -L../lib/mac/Release -L/Users/myuser/Downloads/Xcode\ 4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib -F/Users/myuser/Library/Developer/Xcode/DerivedData/MyProjectPM-fhuurgdjlzytvhghgexdurdptuwa/Build/Products/Release -F../externals/ACMac23.3006/Frameworks -filelist /Users/myuser/Library/Developer/Xcode/DerivedData/MyProjectPM-fhuurgdjlzytvhghgexdurdptuwa/Build/Intermediates.noindex/MyProjectPM.build/Release/MyProjectPM23.build/Objects-normal/x86_64/MyProjectPM23.LinkFileList -mmacosx-version-min=10.13 -stdlib=libc++ -liconv.2 -lCADFramework3rdParty -lACAP_STAT -framework GXImage -framework GSRoot -framework UC -framework DGGraphix -framework Model3D -framework DG -framework UD -framework GSZLib -framework VectorImage -framework Graphix -framework InputOutput -framework GSUtils -framework GX -framework GXImageBase -framework Pattern -framework Cocoa -framework IOKit -Xlinker -dependency_info -Xlinker /Users/myuser/Library/Developer/Xcode/DerivedData/MyProjectPM-fhuurgdjlzytvhghgexdurdptuwa/Build/Intermediates.noindex/MyProjectPM.build/Release/MyProjectPM23.build/Objects-normal/x86_64/MyProjectPM23_dependency_info.dat -o /Users/myuser/Library/Developer/Xcode/DerivedData/MyProjectPM-fhuurgdjlzytvhghgexdurdptuwa/Build/Products/Release/MyProjectPM23.apx/Contents/MacOS/MyProjectPM23
#305816
You probably need to link the project against an additional API framework. Frameworks contain specific functionality that your add-on might need - when the compiler builds the add-on, it needs to know which frameworks to use.

I'm not 100% sure which framework you're missing, but try adding AttributeManager.framework first (from the Support/Frameworks path).