I am getting an error when trying to run the makefile script (FileGDB_API_1_4_64_gcc.zip). This was esri tech-support case 01891003.
My goal is to be able to write a fileGDB using GDAL (and ogr2ogr from postgis). I assume I need to successfully run the make script in order to have the right libraries to copy.
I’m running El Capitan (Mac OSX 10.11.5 15F34; Kernel Darwin 15.5.0) on a mac that’s a few years old (i7 processor, model iMac14,2).
As described in the README file, I checked the gcc version, set the LD_LIBRARY_PATH, set CXX and then tried to ‘make’ but got an error; see below for the error from make and the response to ‘make –v’ (which seems to refer to a version of GNU that was built for a MUCH older kernel).
prompt> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
prompt> LD_LIBRARY_PATH='/Users/steven/Desktop/FileGDB_API-64gcc'
prompt> echo $LD_LIBRARY_PATH
/Users/steven/Desktop/FileGDB_API-64gcc
prompt> CXX=g++
prompt> echo $CXX
g++
prompt> cd samples
prompt> make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Domains
c++ -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, std::__1::allocator > const&)", referenced from:
_main in Domains.o
"FileGDBAPI::Geodatabase::CreateDomain(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > 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, std::__1::allocator > 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, std::__1::allocator >&) 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
prompt> samples steven$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0