BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

AC23 linking problem on OSX

Anonymous
Not applicable
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,
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Ralph Wessel
Mentor
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).
Ralph Wessel BArch

View solution in original post

3 REPLIES 3
Anonymous
Not applicable
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
Solution
Ralph Wessel
Mentor
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).
Ralph Wessel BArch
Anonymous
Not applicable
Thanks for the idea.
However not the AttributeManager.framework but the ObjectDatabase.framework was the solution.

Thanks,
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!