Page 1 of 1

Problem FiveMac and Maverick OSX 10.9

Posted: Wed Dec 11, 2013 7:10 pm
by vensanto
Dear Antonio
i have installed fivemac of FTDN 13.06 on MAC OSX 10.9 with xcode 5.1
when i compile tutor01.prg
i get this error message

Undefined symbols for architecture x86_64:
"_HB_FUN_ERRORLINK", referenced from:
_symbols_table in ....

Please help me
Best regards
Santo Venezia

Re: Problem FiveMac and Maverick OSX 10.9

Posted: Wed Dec 11, 2013 11:34 pm
by mastintin
please , show build.sh code ..

Re: Problem FiveMac and Maverick OSX 10.9

Posted: Thu Dec 12, 2013 3:40 am
by vensanto
# ./build.sh - (c) FiveTech Software 2007-2010

clear

if [ $# = 0 ]; then
echo syntax: ./build.sh file [options...]
exit
fi

echo compiling...
./../../harbour/bin/harbour $1 -n -w -I./../include:./../../harbour/include $2
if [ $? = 1 ]; then
exit
fi

echo compiling C module...
SDKPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
HEADERS=$SDKPATH/usr/include
# add -arch ppc -arch i386 for universal binaries
gcc $1.c -c -I./../include -I./../../harbour/include -I$HEADERS

if [ ! -d $1.app ]; then
mkdir $1.app
fi
if [ ! -d $1.app/Contents ]; then
mkdir $1.app/Contents
echo '<?xml version="1.0" encoding="UTF-8"?>' > $1.app/Contents/Info.plist
echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' >> $1.app/Contents/Info.plist
echo '<plist version="1.0">' >> $1.app/Contents/Info.plist
echo '<dict>' >> $1.app/Contents/Info.plist
echo ' <key>CFBundleExecutable</key>' >> $1.app/Contents/Info.plist
echo ' <string>'$1'</string>' >> $1.app/Contents/Info.plist
echo ' <key>CFBundleName</key>' >> $1.app/Contents/Info.plist
echo ' <string>'$1'</string>' >> $1.app/Contents/Info.plist
echo ' <key>CFBundleIdentifier</key>' >> $1.app/Contents/Info.plist
echo ' <string>com.fivetech.'$1'</string>' >> $1.app/Contents/Info.plist
echo ' <key>CFBundlePackageType</key>' >> $1.app/Contents/Info.plist
echo ' <string>APPL</string>' >> $1.app/Contents/Info.plist
echo ' <key>CFBundleInfoDictionaryVersion</key>' >> $1.app/Contents/Info.plist
echo ' <string>6.0</string>' >> $1.app/Contents/Info.plist
echo ' <key>CFBundleIconFile</key>' >> $1.app/Contents/Info.plist
echo ' <string>fivetech.icns</string>' >> $1.app/Contents/Info.plist
echo '</dict>' >> $1.app/Contents/Info.plist
echo '</plist>' >> $1.app/Contents/Info.plist
fi
if [ ! -d $1.app/Contents/MacOS ]; then
mkdir $1.app/Contents/MacOS
fi
if [ ! -d $1.app/Contents/Resources ]; then
mkdir $1.app/Contents/Resources
cp ./../icons/fivetech.icns $1.app/Contents/Resources/
fi
if [ ! -d $1.app/Contents/frameworks ]; then
mkdir $1.app/Contents/frameworks
cp -r ./../frameworks/* $1.app/Contents/frameworks/
fi

echo linking...
CRTLIB=$SDKPATH/usr/lib
HRBLIBS='-lhbdebug -lhbvm -lhbrtl -lhblang -lhbrdd -lhbrtl -lgttrm -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbcommon -lhbcplr'
FRAMEWORKS='-framework Cocoa -framework WebKit -framework QTkit -framework Quartz'
# add -arch ppc -arch i386 for universal binaries
gcc $1.o -o ./$1.app/Contents/MacOS/$1 -L$CRTLIB -L./../lib -lfive -lfivec -L./../../harbour/lib $HRBLIBS $FRAMEWORKS -F./../frameworks -framework Scintilla

rm $1.c
rm $1.o

echo done!
./$1.app/Contents/MacOS/$1
# reset

Re: Problem FiveMac and Maverick OSX 10.9

Posted: Thu Dec 12, 2013 9:31 am
by mastintin
Change :
SDKPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
for :
SDKPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

or donwload MacOSX10.7.sdk from apple . http://adcdownload.apple.com/Developer_ ... e_2012.dmg

Re: Problem FiveMac and Maverick OSX 10.9

Posted: Thu Dec 12, 2013 7:52 pm
by vensanto
Thank you very much
mastintin

now it is ok

Best Regard
Santo