Page 1 of 3

Construir Harbour con BCC 7.1

Posted: Mon Apr 17, 2017 5:09 pm
by Vikthor.Thomas
Buen día
He bajado los fuentes de Harbour y también he tratado de realizar la compilación sin obtener éxito.
El resultado que obtengo es el siguiente

Code: Select all

C:\Harbour>win-make.exe clean 
! Building Harbour 3.2.0dev from source - http://harbour-project.org
! MAKE: win-make.exe 4.1 sh.exe clean  
! HB_HOST_PLAT: win (x86_64)  HB_SHELL: nt
! HB_PLATFORM: win (x86) 
! HB_COMPILER: bcc64 
! Component: 'zlib' found in C:/Harbour/src/3rd/zlib (local)
! Component: 'pcre' found in C:/Harbour/src/3rd/pcre (local)
! Component: 'gpm' not supported on win platform
! Component: 'slang' not found. Configure with HB_WITH_SLANG.
! Component: 'curses' not found. Configure with HB_WITH_CURSES.
! Component: 'x11' not found. Configure with HB_WITH_X11.
! Component: 'wattcp/watt-32' not supported on win platform
! 'hbdossrl' library skipped (platform or compiler not supported)
! 'gtcrs' library skipped (component not found)
! 'gtdos' library skipped (platform not supported)
! 'gtos2' library skipped (platform not supported)
! 'gtsln' library skipped (component not found)
! 'gttrm' library skipped (platform or compiler not supported)
! 'gtxwc' library skipped (component not found)
! Warning: hbmk2 not found, contrib/make.hb skipped.
! Warning: hbmk2 not found, config/postinst.hb skipped.
 
Los valores que tienen HB_PLATFORM y HB_COMPILER son
@set HB_PLATFORM=win
@set HB_COMPILER=bcc64

Estoy usando Win10

Saludos

Re: Construir Harbour con BCC 7.1

Posted: Mon Apr 17, 2017 9:40 pm
by Antonio Linares
Despues de win-make.exe clean tienes que llamar a win-make.exe (sin el clean)

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 2:22 pm
by Vikthor.Thomas
Antonio, gracias por responder.
Ahora obtengo el siguiente aviso

Code: Select all

! Building Harbour 3.2.0dev from source - http://harbour-project.org
! MAKE: win-make.exe 4.1 sh.exe   
! HB_HOST_PLAT: win (x86_64)  HB_SHELL: nt
! HB_PLATFORM: win (x86) 
! HB_COMPILER: bcc64 
! Component: 'zlib' found in C:/Harbour/src/3rd/zlib (local)
! Component: 'pcre' found in C:/Harbour/src/3rd/pcre (local)
! Component: 'gpm' not supported on win platform
! Component: 'slang' not found. Configure with HB_WITH_SLANG.
! Component: 'curses' not found. Configure with HB_WITH_CURSES.
! Component: 'x11' not found. Configure with HB_WITH_X11.
! Component: 'wattcp/watt-32' not supported on win platform
win-make.exe[1]: Nothing to be done for 'all'.
win-make.exe[1]: Nothing to be done for 'all'.
! 'hbdossrl' library skipped (platform or compiler not supported)
bcc64.exe   -I. -I../../../../../../include -q -tWM -CP437 -w-sig- -w-aus- -w-ccc- -w-csu- -w-par- -w-rch- -w-ucp- -w-use- -w-prc- -w-pia- -d -O2 -OS -Ov -Oc  -DUNICODE -IC:/Harbour/src/3rd/zlib -DPNG_NO_STDIO  -opng.o  -c ../../../png.c
../../../../../../config/rules.mk:84: recipe for target 'png.o' failed
../../../config/lib.mk:68: recipe for target 'descend' failed
../../config/dir.mk:71: recipe for target 'png' failed
../config/dir.mk:71: recipe for target '3rd' failed
config/dir.mk:71: recipe for target 'src' failed
 
Al final aparece lo siguiente

Code: Select all


process_begin: CreateProcess(NULL, bcc64.exe -I. -I../../../../../../include -q -tWM -CP437 -w-sig- -w-aus- -w-ccc- -w-csu- -w-par- -w-rch- -w-ucp- -w-use- -w-prc- -w-pia- -d -O2 -OS -Ov -Oc -DUNICODE -IC:/Harbour/src/3rd/zlib -DPNG_NO_STDIO -opng.o -c ../../../png.c, ...) failed.
make (e=2): El sistema no puede encontrar el archivo especificado.
win-make.exe[4]: *** [png.o] Error 2
win-make.exe[3]: *** [descend] Error 2
win-make.exe[2]: *** [png] Error 2
win-make.exe[1]: *** [3rd] Error 2
win-make.exe: *** [src] Error 2

 

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 6:02 pm
by compubrion
Hola Victor, saludos
Remplaza la lib unicows.a de borland por la que trae harbour en lib\3rd\win\bcc\unicows.lib

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 6:32 pm
by Vikthor.Thomas
compubrion wrote:Hola Victor, saludos
Remplaza la lib unicows.a de borland por la que trae harbour en lib\3rd\win\bcc\unicows.lib
Gracias por la respuesta.
Ya hice el cambio y el resultado fue el mismo :-(

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 7:31 pm
by Antonio Linares
No encuentra bcc64.exe

Haz esto antes de llamar a win-make

set path=c:\bcc7164\bin

usa tu path

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 8:14 pm
by Vikthor.Thomas
Antonio Linares wrote:No encuentra bcc64.exe

Haz esto antes de llamar a win-make

set path=c:\bcc7164\bin

usa tu path
En que parte se configuran los los flags ?

Code: Select all




! 'hbdossrl' library skipped (platform or compiler not supported)
bcc64.exe   -I. -I../../../../../../include -q -tWM -CP437 -w-sig- -w-aus- -w-ccc- -w-csu- -w-par- -w-rch- -w-ucp- -w-use- -w-prc- -w-pia- -d -O2 -OS -Ov -Oc  -DUNICODE -IC:/Harbour/src/3rd/zlib -DPNG_NO_STDIO  -opng.o  -c ../../../png.c
bcc64.exe: warning: argument unused during compilation: '-CP437'
bcc64.exe: warning: argument unused during compilation: '-w-sig-'
bcc64.exe: warning: argument unused during compilation: '-w-aus-'
bcc64.exe: warning: argument unused during compilation: '-w-ccc-'
bcc64.exe: warning: argument unused during compilation: '-w-csu-'
bcc64.exe: warning: argument unused during compilation: '-w-par-'
bcc64.exe: warning: argument unused during compilation: '-w-rch-'
bcc64.exe: warning: argument unused during compilation: '-w-ucp-'
bcc64.exe: warning: argument unused during compilation: '-w-use-'
bcc64.exe: warning: argument unused during compilation: '-w-prc-'
bcc64.exe: warning: argument unused during compilation: '-w-pia-'
bcc64.exe: warning: argument unused during compilation: '-d'
../../../png.c:
error: invalid integral value 'c' in '-Oc'
error: invalid integral value 'c' in '-Oc'
../../../../../../config/rules.mk:84: recipe for target 'png.o' failed
win-make.exe[4]: *** [png.o] Error 1
../../../config/lib.mk:68: recipe for target 'descend' failed
win-make.exe[3]: *** [descend] Error 2
../../config/dir.mk:68: recipe for target 'png.inst' failed
win-make.exe[2]: *** [png.inst] Error 2
../config/dir.mk:68: recipe for target '3rd.inst' failed
win-make.exe[1]: *** [3rd.inst] Error 2
config/dir.mk:68: recipe for target 'src.inst' failed
win-make.exe: *** [src.inst] Error 2
 

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 9:31 pm
by carlos vargas
ok, para poder construir bcc64 bit, con harbour no muy facil que digamos.
se deben realizar cambios en ciertos archivos de encabezado, configuracion, y prg. de harbour:

1.- modificar "harbour\include\hbregex.h"

Code: Select all

#if defined( _HB_REGEX_INTERNAL_ )

#if __BORLANDC__ >= 0x710
   #undef HB_HAS_PCRE
#endif

#ifdef defined( HB_HAS_PCRE )
#  include <pcre.h>
#  undef HB_POSIX_REGEX
#elif defined( HB_OS_UNIX )
#  include <sys/types.h>
#  include <regex.h>
#  define HB_POSIX_REGEX
#elif defined( __BORLANDC__ )
#  include <pcreposi.h>
#  define HB_POSIX_REGEX
#else
#  error pcre component required, but not available
#endif
 

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 9:50 pm
by carlos vargas
harbour\config\win\global.mk

Code: Select all

all : first

RES_EXT := .res
BIN_EXT := .exe
DYN_EXT := .dll

HB_CFLAGS += -DUNICODE

HB_GT_LIBS += gtwvt gtgui gtwin

# kernel32: needed by some compilers (pocc/watcom)
# user32: *Clipboard*(), GetKeyState(), GetKeyboardState(), SetKeyboardState(), gtwvt stuff
# ws2_32/wsock32: hbsocket
# ws2_32: WSAIoctl()
# iphlpapi: hbsocket->GetAdaptersInfo()
# advapi32: GetUserName()
# gdi32: gtwvt

# unicows lib must come after user libs and before Windows system libs
ifneq ($(wildcard $(TOP)$(ROOT)lib/3rd/$(HB_PLATFORM)/$(HB_COMPILER)),)
   3RDLIB_DIR := $(TOP)$(ROOT)lib/3rd/$(HB_PLATFORM)/$(HB_COMPILER)
   3RDLIBS := unicows
endif

#KDS
ifeq ($(HB_COMPILER),bcc64)
   SYSLIBS += d:\compiler\bcc\lib\win64\psdk\kernel32 d:\compiler\bcc\lib\win64\psdk\user32 d:\compiler\bcc\lib\win64\psdk\ws2_32 d:\compiler\bcc\lib\win64\psdk\iphlpapi d:\compiler\bcc\lib\win64\psdk\advapi32 d:\compiler\bcc\lib\win64\psdk\gdi32
else
   SYSLIBS += kernel32 user32 ws2_32 iphlpapi advapi32 gdi32
endif

SYSLIBS += kernel32 user32 ws2_32 iphlpapi advapi32 gdi32 winmm
 

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 9:51 pm
by carlos vargas
harbour\config\win\bcc.mk

Code: Select all

# GNU Make file for Borland/CodeGear/Embarcadero C/C++ 32-bit (4.x-)

ifeq ($(HB_COMPILER),bcc64)
   OBJ_EXT := .o
   LIB_PREF :=
   LIB_EXT := .a
else
   OBJ_EXT := .obj
   LIB_PREF :=
   LIB_EXT := .lib
endif

HB_DYN_COPT := -DHB_DYNLIB

ifeq ($(HB_COMPILER),bcc64)
   CC := bcc64.exe
else
   CC := bcc32.exe
endif
CC_IN := -c
CC_OUT := -o

CFLAGS += -I. -I$(HB_HOST_INC)

#KDS CFLAGS += -q -tWM -CP437
CFLAGS += -q -tWM

ifeq ($(HB_BUILD_WARN),no)
   #CFLAGS += -w-sig- -w-aus- -w-ccc- -w-csu- -w-par- -w-rch- -w-ucp- -w-use- -w-prc- -w-pia-
else
   CFLAGS += -w -Q -w-sig-
endif

ifneq ($(HB_BUILD_OPTIM),no)
   ifeq ($(HB_COMPILER),bcc64)
      #KDS CFLAGS += -d -O2 -OS -Ov -Oc
      CFLAGS += -d -O2 -Id:\compiler\bcc\include\windows\crtl -Id:\compiler\bcc\include\windows\sdk
   else
      # for some reason -6 generates the exact same code as -4 with both 5.5 and 5.8.
      # -5 seems to be significantly slower than both. [vszakats]
      CFLAGS += -d -O2 -OS -Ov -Oc -Oi -6
   endif
endif

ifeq ($(HB_BUILD_MODE),cpp)
   CFLAGS += -P
endif

ifeq ($(HB_BUILD_DEBUG),yes)
   ifeq ($(HB_COMPILER),bcc64)
      CFLAGS += -g
   else
      CFLAGS += -v -y
   endif
endif

ifneq ($(HB_HOST_PLAT_UNIX),)
   BACKSLASH := $(subst /,\,\\)
else
   BACKSLASH := $(subst /,\,\)
endif

ifeq ($(HB_SHELL),sh)
   ECHOBACKSLASH := $(BACKSLASH)$(BACKSLASH)
else
   ECHOBACKSLASH := $(BACKSLASH)
endif

# Hack to autoconfig bcc, and not require properly set .cfg files in its bin dir.
# It only works if we know compiler location.
ifneq ($(HB_COMP_PATH_PUB),)
   HB_CFLAGS += $(subst /,$(BACKSLASH),-I"$(HB_COMP_PATH_PUB)../Include")
   RCFLAGS   += $(subst /,$(BACKSLASH),-I"$(HB_COMP_PATH_PUB)../Include")
   ifneq ($(wildcard $(HB_COMP_PATH_PUB)../Include/windows/crtl),)
      HB_CFLAGS += $(subst /,$(BACKSLASH),-I"$(HB_COMP_PATH_PUB)../Include/windows/crtl")
      RCFLAGS   += $(subst /,$(BACKSLASH),-I"$(HB_COMP_PATH_PUB)../Include/windows/crtl")
   endif
   ifneq ($(wildcard $(HB_COMP_PATH_PUB)../Include/windows/sdk),)
      HB_CFLAGS += $(subst /,$(BACKSLASH),-I"$(HB_COMP_PATH_PUB)../Include/windows/sdk")
      RCFLAGS   += $(subst /,$(BACKSLASH),-I"$(HB_COMP_PATH_PUB)../Include/windows/sdk")
   endif
   ifeq ($(HB_COMPILER),bcc64)
      LDFLAGS   += $(subst /,$(BACKSLASH),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/Win64/PSDK")
      DFLAGS    += $(subst /,$(BACKSLASH),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/Win64/PSDK")
   else
      LDFLAGS   += $(subst /,$(BACKSLASH),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK")
      DFLAGS    += $(subst /,$(BACKSLASH),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK")
   endif
endif

RC := brcc32.exe
RC_OUT := -fo
ifeq ($(HB_COMPILER),bcc64)
   RCFLAGS += -I. -I$(HB_HOST_INC) -Id:\compiler\bcc\include\windows\sdk
else
   RCFLAGS += -I. -I$(HB_HOST_INC)
endif

ifeq ($(HB_COMPILER),bcc64)
   LD := ilink64.exe
else
   LD := ilink32.exe
endif

LIBPATHS := $(foreach dir,$(LIB_DIR) $(3RDLIB_DIR),$(subst /,$(BACKSLASH),-L"$(dir)"))
LDFLAGS += $(LIBPATHS) -Gn -Tpe

ifeq ($(HB_COMPILER),bcc64)
   LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) d:\compiler\bcc\lib\win64\c0x64.o $(filter-out %$(RES_EXT),$(^F)), "$(subst /,$(BACKSLASH),$(BIN_DIR)/$@)", nul, $(LDLIBS) d:\compiler\bcc\lib\win64\cw64mt d:\compiler\bcc\lib\win64\import64,, $(filter %$(RES_EXT),$(^F)) $(LDSTRIP)
else
   LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) c0x32.obj $(filter-out %$(RES_EXT),$(^F)), "$(subst /,$(BACKSLASH),$(BIN_DIR)/$@)", nul, $(LDLIBS) cw32mt import32,, $(filter %$(RES_EXT),$(^F)) $(LDSTRIP)
endif

LDLIBS := $(strip $(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS))

ifeq ($(HB_COMPILER),bcc64)
   AR := tlib64.exe
else
   AR := tlib.exe
endif
ARFLAGS += /P128
AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) "$(subst /,$(BACKSLASH),$(LIB_DIR)/$@)" $(foreach file,$(?F),-+$(file))

ifneq ($(HB_SHELL),sh)
   ifeq ($(HB_SHELL_XP),)

      ifeq ($(HB_SHELL),nt)
         LINECONT := ^&
      else
         LINECONT := &
      endif

      # NOTE: Command-line limit length defeating methods found below
      #       are only needed to support pre-Windows XP systems, where
      #       limit is 2047 chars. [vszakats]

      # NOTE: The empty line directly before 'endef' HAVE TO exist!
      define library_object
         @$(ECHO) $(ECHOQUOTE)-+$(subst /,$(ECHOBACKSLASH),$(file)) $(LINECONT)$(ECHOQUOTE) >> __lib__.tmp

      endef

      define create_library
         $(if $(wildcard __lib__.tmp),@$(RM) __lib__.tmp,)
         $(foreach file,$(?F),$(library_object))
         @$(ECHO) $(ECHOQUOTE)-+$(ECHOQUOTE)>> __lib__.tmp
         $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) "$(subst /,$(BACKSLASH),$(LIB_DIR)/$@)" @__lib__.tmp
      endef

      AR_RULE = $(create_library)

   endif
endif

ifeq ($(HB_COMPILER),bcc64)
   DY := ilink64.exe
else
   DY := ilink32.exe
endif
DFLAGS += -q -Gn -C -aa -Tpd -Gi -x $(LIBPATHS)
DY_OUT :=
# NOTE: .lib extension not added to keep line short enough to work on Win9x/ME
ifeq ($(HB_COMPILER),bcc64)
   DLIBS := $(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS) d:\compiler\bcc\lib\win64\cw64mt d:\compiler\bcc\lib\win64\import64
else
   DLIBS := $(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS) cw32mt import32
endif

# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dynlib_object
   @$(ECHO) $(ECHOQUOTE)$(subst /,$(ECHOBACKSLASH),$(file)) +$(ECHOQUOTE) >> __dyn__.tmp

endef

#KDS 
ifeq ($(HB_COMPILER),bcc64)
   define create_dynlib
      $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
      $(foreach file,$^,$(dynlib_object))
      @$(ECHO) $(ECHOQUOTE), $(subst /,$(ECHOBACKSLASH),$(DYN_DIR)/$@),, $(subst /,$(ECHOBACKSLASH),$(DLIBS))$(ECHOQUOTE) >> __dyn__.tmp
      $(DY) $(DFLAGS) $(HB_USER_DFLAGS) d:\compiler\bcc\lib\win64\c0d64.o @__dyn__.tmp
      @$(CP) $(subst /,$(DIRSEP),$(DYN_DIR)/$(basename $@)$(LIB_EXT)) $(subst /,$(DIRSEP),$(IMP_FILE))
      @$(RM) $(subst /,$(DIRSEP),$(DYN_DIR)/$(basename $@)$(LIB_EXT))
   endef
else
   define create_dynlib
      $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
      $(foreach file,$^,$(dynlib_object))
      @$(ECHO) $(ECHOQUOTE), $(subst /,$(ECHOBACKSLASH),$(DYN_DIR)/$@),, $(subst /,$(ECHOBACKSLASH),$(DLIBS))$(ECHOQUOTE) >> __dyn__.tmp
      $(DY) $(DFLAGS) $(HB_USER_DFLAGS) c0d32.obj @__dyn__.tmp
      @$(CP) $(subst /,$(DIRSEP),$(DYN_DIR)/$(basename $@)$(LIB_EXT)) $(subst /,$(DIRSEP),$(IMP_FILE))
      @$(RM) $(subst /,$(DIRSEP),$(DYN_DIR)/$(basename $@)$(LIB_EXT))
   endef
endif

DY_RULE = $(create_dynlib)

include $(TOP)$(ROOT)config/rules.mk 
 

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 9:55 pm
by carlos vargas
debo aclarar que yo tengo el compilador borland en la siguiente ruta
d:\compiler\bcc
y que ademas en la misma carpeta tengo los tres compiladores de borland (bcc, bcc32c, bcc64)
lo unico diferente es que
en la carpeta include hay una carpeta adicional llamada dinkumware64
\include\dinkumware64
y que en la carpeta lib, tengo tres subcarpetas
\lib\win32
\lib\win32c
\lib\win64

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 9:57 pm
by carlos vargas
otro punto es que en la version que uso, bcc730, parece que el parametro -d para el compilador bcc64 ya no funciona.
por lo que el cambio en \harbour\config\win\bcc.mk

Code: Select all

      #KDS CFLAGS += -d -O2 -OS -Ov -Oc
      CFLAGS += -d -O2 -Id:\compiler\bcc\include\windows\crtl -Id:\compiler\bcc\include\windows\sdk
 
deberia quedar asi

Code: Select all

      #KDS CFLAGS += -d -O2 -OS -Ov -Oc
      CFLAGS += -O2 -Id:\compiler\bcc\include\windows\crtl -Id:\compiler\bcc\include\windows\sdk
 

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 9:58 pm
by carlos vargas

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 10:01 pm
by carlos vargas
aca dejo los tres archivos con _ necesarios.

http://castillolawyers.no-ip.info/owncl ... peMvZONGcl

Re: Construir Harbour con BCC 7.1

Posted: Tue Apr 18, 2017 10:05 pm
by carlos vargas
cabe aclarar, que el compilador harboury las librerias bases si son construidas, pero no asi el hbmk2.exe, lo que provoca que cuando va ha construir las librerias de la carpeta "contrib" de un error, ya que ahi se usa hbmk2 como gestor de proyectos para construir cada uno de las contribuciones.

pero si no modifico hbregex.h, el hbmk2.exe es construido, pero no es posible que se ejecute correctamente ya que da error de tipo overflow o algo por el estilo, no recuerdo.

si alguien puede aportar _ necesarios para reparar esto, pues muy agradecido.