Has anyone been able to get the 1.3 FileGDB samples to build on Yosemite? I followed the instructions in the ReadMe file but get an "Undefined symbols for architecture x86_64:" error. Full error below.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Domains
g++ -fPIC -O3 -m64 -arch x86_64 -W -fexceptions -D_CONSOLE -DUNICODE -D_UNICODE -DUNIX -D_REENTRANT -DFILEGDB_API -D__USE_FILE_OFFSET64 -DUNIX_FILEGDB_API -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../../include -I. -m64 -arch x86_64 -L"../../lib" -o ../bin/Domains ./Domains.o -lFileGDBAPI
Undefined symbols for architecture x86_64:
"FileGDBAPI::Geodatabase::AlterDomain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in Domains.o
"FileGDBAPI::Geodatabase::CreateDomain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in Domains.o
"FileGDBAPI::Geodatabase::DeleteDomain(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&)", referenced from:
_main in Domains.o
"FileGDBAPI::Geodatabase::OpenTable(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, FileGDBAPI::Table&)", referenced from:
_main in Domains.o
"FileGDBAPI::OpenGeodatabase(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, FileGDBAPI::Geodatabase&)", referenced from:
_main in Domains.o
"FileGDBAPI::Table::AlterField(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in Domains.o
"FileGDBAPI::ErrorInfo::GetErrorRecord(int, int&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&)", referenced from:
_main in Domains.o
"FileGDBAPI::ErrorInfo::GetErrorDescription(int, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&)", referenced from:
_main in Domains.o
"FileGDBAPI::Geodatabase::GetDomainDefinition(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const", referenced from:
_main in Domains.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../bin/Domains] Error 1
make: *** [Domains] Error 2
Solved! Go to Solution.
We haven't tested 1.3 with Yosemite. The 1.4 version will support it. Check the following:
1) Is the lib directory is not in your DYLD_LIBRARY_PATH.
2) Is your version of gcc is older than the one we build on (4.2.1).
3) if you recently updated to Yosemite and previously installed the Xcode command line tools, you will need to install the new version of Xcode command line tools.
In include/make.include, add:
ifndef CX
CX=g++ -stdlib=libstdc++
endif