can´t compile xHarbour .mak issue

can´t compile xHarbour .mak issue

Postby lucasdebeltran » Thu Jul 12, 2012 9:39 am

Hi,

I am trying to compile with xHarbour.

This .mak works fine with Harbour, but in xHarbour the app does not start and gives a GPF.

Maybe it is related to flags in compiler or in linker.

Thank you very much for the help.

Code: Select all  Expand view
#Borland make sample, (c) FiveTech Software 2005-2009

HBDIR=c:\xharbour
BCDIR=c:\bcc582
FWDIR=c:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =         \
VARIOS.PRG    \
GESTION.PRG



PROJECT    : GESTION.EXE

GESTION.EXE  : $(PRG:.PRG=.OBJ) GESTION.RES
   @echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\VARIOS.OBJ obj\GESTION.OBJ, + >> b32.bc
   echo GESTION.EXE, + >> b32.bc
   echo GESTION.MAP, + >> b32.bc

   echo $(FWDIR)\lib\FiveHx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc

   echo $(HBDIR)\lib\rtl.lib + >> b32.bc
   echo $(HBDIR)\lib\vm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\lang.lib + >> b32.bc
   echo $(HBDIR)\lib\macro.lib + >> b32.bc
   echo $(HBDIR)\lib\rdd.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\debug.lib + >> b32.bc
   echo $(HBDIR)\lib\common.lib + >> b32.bc
   echo $(HBDIR)\lib\pp.lib + >> b32.bc
   echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc
   echo $(HBDIR)\lib\codepage.lib + >> b32.bc
   echo $(HBDIR)\lib\ct.lib + >> b32.bc
   echo $(HBDIR)\lib\zlib.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc
   echo $(HBDIR)\lib\tip.lib + >> b32.bc
   echo $(HBDIR)\lib\libmisc.lib + >> b32.bc


   rem Uncomment these two lines to use Advantage RDD
   echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\wininet.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc



   IF EXIST GESTION.res echo GESTION.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

GESTION.RES : GESTION.RC
  $(BCDIR)\bin\brc32.exe -r GESTION.RC
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: can´t compile xHarbour .mak issue

Postby ukoenig » Thu Jul 12, 2012 12:16 pm

Lucas,

rem Uncomment these two lines to use Advantage RDD

# Uncomment these two lines to use Advantage RDD

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: can´t compile xHarbour .mak issue

Postby Antonio Linares » Thu Jul 12, 2012 12:21 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: can´t compile xHarbour .mak issue

Postby lucasdebeltran » Thu Jul 12, 2012 12:26 pm

Uwe,

Thanks for reply.

I do use ADS, so that´s why are active.

Also I tried to remove ADS. Still the problem.

I can compile with no errors. But when I run the exe I get a GPF.

But in Harbour works fine.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: can´t compile xHarbour .mak issue

Postby lucasdebeltran » Thu Jul 12, 2012 12:45 pm

Hi,

I have a own lib with some classes of Fivewin modified by myself. I link it before Fivewin´s lib.

I compile my lib with xHarbour.

This is my make for the lib:

Code: Select all  Expand view

# Libray directories & filenames #############################################

LIB_NAME         = lib\fivewinx.lib
LIB_PRG_DIR      = source
LIB_OBJ_DIR      = obj
LIB_INCLUDE_DIR  = include


# LIBRARY PRG files (your PRG files go here) #################################

LIB_PRG_LIST =  rpreview.prg \
             meter.prg  \
                         msgget.prg \
            varios.prg \
                       xbrowse.prg \
                      report.prg \
                     errsysw.prg


LIB_C_LIST =

# Make directives ############################################################

.autodepend
.swap
.suffixes: .prg .hrb .c

# Paths for dependent files ##################################################

.path.prg = $(LIB_PRG_DIR)
.path.c   = $(LIB_PRG_DIR)
.path.hrb = $(LIB_OBJ_DIR)
.path.obj = $(LIB_OBJ_DIR)

# Contruction of the rest dependency lists ###################################

LIB_PRGS  = $(LIB_PRG_LIST)
LIB_C     = $(LIB_C_LIST)
LIB_HRB   = $(LIB_PRG_LIST:.prg=.hrb)
LIB_OBJS  = $(LIB_PRG_LIST:.prg=.obj) $(LIB_C_LIST:.c=.obj)

# FiveWin directories & flags ################################################

FW_INCLUDE_DIR = $(FW_DIR)\include
FW_LIB_DIR     = $(FW_DIR)\lib

# Harbour directories & flags ################################################

HARBOUR_INCLUDE_DIR = $(HB_DIR)\include
HARBOUR_EXE_DIR     = $(HB_DIR)\bin
HARBOUR_LIB_DIR     = $(HB_DIR)\lib
HARBOUR_FLAGS       = -i$(LIB_INCLUDE_DIR);$(HARBOUR_INCLUDE_DIR);$(FW_INCLUDE_DIR) -n -m -w -es2 -gc0
HARBOUR_EXE         = $(HARBOUR_EXE_DIR)\harbour.exe

# Borlanc directories & flags ################################################

BORLANDC_INCLUDE_DIR = $(BCC_DIR)\include
BORLANDC_EXE_DIR     = $(BCC_DIR)\bin
BORLANDC_LIB_DIR     = $(BCC_DIR)\lib
BORLANDC_COMP_FLAGS  = -c -O2 -I$(HARBOUR_INCLUDE_DIR);$(BORLANDC_INCLUDE_DIR)
BORLANDC_COMP_EXE    = $(BORLANDC_EXE_DIR)\bcc32.exe
BORLANDC_LIB_EXE     = $(BORLANDC_EXE_DIR)\tlib.exe

# Dependencies ###############################################################

all: $(LIB_OBJS) $(LIB_HRB) $(LIB_NAME)

# Implicit Rules #############################################################

.prg.hrb:
   $(HARBOUR_EXE) $(HARBOUR_FLAGS) $** -o$@

.c.obj:
   $(BORLANDC_COMP_EXE) $(BORLANDC_COMP_FLAGS) -D__HARBOUR__;HB_API_MACROS -o$@ $**
   $(BORLANDC_LIB_EXE) $(LIB_NAME) -+ $@,,

.hrb.obj:
   $(BORLANDC_COMP_EXE) $(BORLANDC_COMP_FLAGS) -o$@ $**
   $(BORLANDC_LIB_EXE) $(LIB_NAME) -+ $@,,


 



I guess I have a wrong flag to compile those modules in xHarbour.

Please, how I should compile those modules?.

Thanks very much.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: can´t compile xHarbour .mak issue

Postby Antonio Linares » Thu Jul 12, 2012 1:05 pm

Lucas,

Please use the same flags that are used in buildx.bat
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Silvio.Falconi and 112 guests