Compiling FreeTDS for iPhoneOS using Autotools

I hope that I am in the right forum for my question, I apologize if I am wrong here!

I am trying to compile FreeTDS in order to use it in an iOS app. I need to use Autotools, but I am completely new to it and it’s kind of overwhelming, but here is what I tried:

I wrote a sh script and ran it:

#!/bin/sh

 # unset some shell variables

#./configure --build is used for specifing the architecture you want to complie for
#./configure --host is used to specify the ark of the machine doing the compileing (running xcode)
#./configure --target seems to be an alias

#uname -p to get system architecture

VERSION="1.3"
SDKVERSION="15"
TARGETSDKVERSION="12"
LIB="freetds"

DEVELOPER=`xcode-select -print-path`
ARCH="arm64"
CURRENTPATH=`pwd`
HOST="i386-apple-darwin21.2.0"
OLD_PATH=$PATH
TDS_VER=7.4

 cd freetds-1.3

 SDK="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"

 unset CC
 unset CXXFLAGS
 unset CFLAGS
 unset LDFLAGS
 unset LP
 unset CPP

 export buildPath=`pwd`


 # make arm target
 #export CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
 export CC="clang"
 export CFLAGS="-arch ${ARCH} -miphoneos-version-min=${TARGETSDKVERSION} -isysroot=${SDK}"
 export CPP=/usr/bin/cpp
 export CXXFLAGS="$CFLAGS"
 export LDFLAGS="$CFLAGS"
 export LD=$CC

 ./configure --build=aarch64-apple-darwin21.2.0 --host=i386-apple-darwin21.2.0 --target=arm64 --with-tdsver=7.4 --with-libiconv-prefix=/Users/yannik/opt/anaconda3

 make clean
 make uninstall

However, I get the error:
clang: **error:** **linker command failed with exit code 1 (use -v to see invocation)**

How can I fix this error and compile my code for iPhoneOS?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.