Git Product home page Git Product logo

Comments (13)

lailton avatar lailton commented on August 24, 2024

### 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.

from core.

efa avatar efa commented on August 24, 2024

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/
?

from core.

lailton avatar lailton commented on August 24, 2024

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 ).

from core.

efa avatar efa commented on August 24, 2024

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?

from core.

lailton avatar lailton commented on August 24, 2024

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.

from core.

efa avatar efa commented on August 24, 2024

does exist a pre-built binaries for Win64?

from core.

lailton avatar lailton commented on August 24, 2024

I don't think so.

from core.

lailton avatar lailton commented on August 24, 2024

Try this one:
https://drive.google.com/file/d/1uZzhOoPm8fazSEQfLsJmxl-qEYh_5JM4/view?usp=share_link

from core.

efa avatar efa commented on August 24, 2024

thank you for the package, I will try that!

from core.

fperillo avatar fperillo commented on August 24, 2024

from core.

efa avatar efa commented on August 24, 2024

Try this one

work, here the generated 32 and 64 bit binaries:
https://drive.google.com/file/d/1IXi96rRz51FGqjM9RZbgG_YEUPXBUAJ6

THANK YOU

from core.

efa avatar efa commented on August 24, 2024

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

from core.

lailton avatar lailton commented on August 24, 2024

Great :octocat:

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.