Open efa opened 1 year ago
### Why your command line show it: /home/efa/c/harbour_win32/lib/win/mingw/libhbct.a
Should be: /home/efa/c/harbour_win32/lib/win/mingw64/libhbct.a
Probably something wrong with the path, but I can be wrong.
there is no mingw64 directory in the Sourceforge 7zip nightly package:
~/c/harbour_win32/lib$ tree -d
.
└── win
└── mingw
2 directories
Those links are the right ones: https://sourceforge.net/projects/harbour-project/files/binaries-windows/3.0.0/ https://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/ ?
In order to build to 64bits you need to have the libraries for 64bits too.
( the way is exactly the same you did to construct the binaries and libraries for 32 ).
sorry, I didn't explained me well. I do not have Windows, I'm using Linux and want cross-compile to Windows. For 32 bit I simply downloaded the already built 7zip win package available at: https://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/ Does exist a 64 bit Win version?
You can build it by yourself.
#!/bin/bash
export HB_PLATFORM="win"
export HB_CCPREFIX="/usr/local/mingw/bin/x86_64-w64-mingw32-"
export HB_INSTALL_PREFIX="/Developer/harbour/"
export HB_HOST_BIN="/Developer/harbour/bin"
export HB_COMPILER="mingw64"
export HB_BUILD_CONTRIBS=
export HB_WITH_PCRE=local
export HB_WITH_ZLIB=local
export HB_WITH_BZIP2=local
export HB_WITH_JPEG=local
export HB_WITH_PNG=local
export HB_WITH_TIFF=local
export HB_WITH_LIBHARU=local
export HB_WITH_SQLITE3=local
PATH=/usr/local/mingw/bin/:$PATH
Long time ago I had used it, adjust to your path and then:
git clone --depth=1 https://github.com/harbour/core.git harbour
cd harbour
make
after that you should have the binaries and libraries for 64bits.
does exist a pre-built binaries for Win64?
I don't think so.
thank you for the package, I will try that!
Hi, the nightly build is 32 bit only.
If I remember correctly, the build runs on a 32 bit old windows server 2003...
Il Mar 20 Dic 2022, 04:06 efa @.***> ha scritto:
thank you for the package, I will try that!
— Reply to this email directly, view it on GitHub https://github.com/harbour/core/issues/281#issuecomment-1357969996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6LSYZH4YV4ESMN2IIFLODWOCIZVANCNFSM6AAAAAAS5Z4BJA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Try this one
work, here the generated 32 and 64 bit binaries: https://drive.google.com/file/d/1IXi96rRz51FGqjM9RZbgG_YEUPXBUAJ6
THANK YOU
here attached the final version of the bash script used to cross-build:
#!/bin/sh
# Copyright 2022 Valerio Messina, harbour 1.1.0 2022/12/19
# harbour is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ver 3
# this script (cross)compile a PRG file with harbour
# Syntax: $ harbour <source.prg> [win [32]]|[mac [arm]]
if (test "" = "$1") then
echo ERROR: harbour need a PRG file name
echo "Syntax: $ harbour <source.prg> [win [32]]|[mac [arm]]"
exit
fi
rm *.o *.c 2> /dev/null
deps="hbct.hbc xhb.hbc"
#deps=""
if (test "$2" = "win") then
# set env vars for mingw ...
if (test "$3" = "32") then
echo "Cross-building for Win32 ..."
export HOST=i686-w64-mingw32
else
echo "Cross-building for Win64 ..."
export HOST=x86_64-w64-mingw32
fi
export CROSS=${HOST}-
export CC=${CROSS}gcc
# set env vars for harbour ...
export HB_WITH_CURSES=no
export HB_BUILD_3RDEXT=no
export HB_BUILD_CONTRIBS=no
export HB_BUILD_DYN=no
export HB_BUILD_NAME=$HOST
export HB_CCPATH=/usr/bin/
export HB_CCPREFIX=$CROSS
export HB_COMPILER=mingw64 # or mingw, clang
export HB_CPU=x86-64 # or x86
if (test "$3" = "32") then
export HB_COMPILER=mingw # or mingw, clang
export HB_CPU=x86
fi
export HB_HOST_BIN=$HOME/c/harbour-core/bin/linux/gcc
export HB_PLATFORM=win
export HB_USER_LDFLAGS="-L$HOME/c/harbour_win/lib/win/mingw64"
if (test "$3" = "32") then
export HB_USER_LDFLAGS="-L$HOME/c/harbour_win/lib/win/mingw"
fi
fi
if (test "$2" = "mac") then
echo "Cross-building for macOS64 ..."
# set env vars for osxcross ...
export SDK_VERSION=11.1 # set built tools generation
export ODVER=20.2
export OHOST=i386-apple-darwin$ODVER # only till darwin17
export OHOST=x86_64-apple-darwin$ODVER
if (test "$3" = "arm") then
echo "arm64 Apple Silicon"
export OHOST=arm64-apple-darwin$ODVER
fi
export OCROSS=$OHOST-
export OSXROOT=/opt/osxcross
export OSX=$OSXROOT/target/bin
export OSXDEPS=$OSXROOT/target/macports
export OSXQUARTZ=$OSXROOT/target/quartz
export OSXCROSS_TARGET=darwin$ODVER
export MACOSX_DEPLOYMENT_TARGET=$SDK_VERSION # used for macports
export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
export PKG_CONFIG_LIBDIR=$OSXDEPS/pkgs/opt/local/lib/pkgconfig:$OSXDEPS/pkgs/opt/local/share/pkgconfig
export PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR
export PATH=$OSX:$PATH
# set env vars for harbour ...
export TOOLCHAINDIR=$OSXROOT
export TOOLCHAIN_DIR=$OSXROOT
export HB_WITH_CURSES=no
export HB_BUILD_3RDEXT=no
export HB_BUILD_CONTRIBS=no
export HB_BUILD_DYN=no
export HB_BUILD_NAME=$OHOST
export HB_CCPATH=$OSX
export HB_CCPREFIX=$OCROSS
export HB_COMPILER=clang
export HB_CPU=x86-64
if (test "$3" = "arm") then
export HB_CPU=arm
fi
export HB_HOST_BIN=$HOME/c/harbour-core/bin/linux/gcc
export HB_PLATFORM=darwin
export HB_USER_LDFLAGS="-L$HOME/c/harbour_macOS.amd64/lib/darwin/clang -L$OSXROOT/target/lib/"
if (test "$3" = "arm") then
export HB_USER_LDFLAGS="-L$HOME/c/harbour_macOS.arm64/lib/darwin/clang -L$OSXROOT/target/lib/"
fi
fi
if (test "" = "$2") then # native compile
echo "Native building for Linux64 ..."
fi
echo "Running: $HOME/c/harbour-core/bin/linux/gcc/hbmk2 -workdir=. -inc $1 $deps"
$HOME/c/harbour-core/bin/linux/gcc/hbmk2 -workdir=. -inc $1 $deps
#rm *.o *.c 2> /dev/null
echo ""
hope will help someone. THANK YOU
Great :octocat:
hi, I downloaded the nightly: harbour-nightly-win.7z | 2022-10-17 and extracted to
/home/efa/c/harbour_win32
I'm using this script to cross-build:
while build to Win32 work:
I got linking error targeting 64 bit Windows:
Is the nightly package 32 bit only?