compiling

compiling

Postby dtussman » Thu Jan 28, 2016 8:47 pm

I am trying to recompile an old application using FWH1507 but am confused. Apparently you have to use Borland 7 with that but I can find no reference anywhere on the web to a version 7 of Borland. If I try to compile with Boland 5.5 I get all kinds of strange errors, but I don't know if that is the cause of it. James Bott was initially helping me with this but I can't get ahold of him.
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: compiling

Postby dtussman » Thu Jan 28, 2016 9:30 pm

I will be more specific:

James Bott wrote the following go.bat file to begin the compiling process:

Code: Select all  Expand view  RUN
if not exist obj md obj
c:\bcc582\bin\make -ftp.mak >test.log

rem del *.map
rem del *.ppo
rem del *.tds

pause


The tp.mak file looks like this:

Code: Select all  Expand view  RUN
#Borland make file for The Tussman Program
#Author: James Bott, jbott@compuserve.com
#Date  : 8/18/2015 7:02:14 AM

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 =        \
tp.PRG     \
tp1.PRG    \
tp2.PRG    \
tp3.PRG    \
tp4.PRG    \
tp5.PRG    \
tp6.PRG    \
tp7.PRG    \
tp8.PRG    \
tp9.PRG    \
tp10.PRG   \
tp11.PRG   \
tp12.PRG   \
tp13.PRG   \
tp14.PRG   \
rbill.PRG        

               

PROJECT    : tp.exe

tp.exe  : $(PRG:.PRG=.OBJ) #####$(C:.C=.OBJ) tp.res
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\tp.obj obj\tp1.obj obj\tp2.obj obj\tp3.obj obj\tp4.obj obj\tp5.obj + >> b32.bc
   echo obj\tp6.obj obj\tp7.obj obj\tp8.obj obj\tp9.obj obj\tp10.obj obj\tp11.obj + >> b32.bc
   echo obj\tp12.obj obj\tp13.obj obj\tp14.obj + >> b32.bc
   echo obj\rbill.obj, +>> b32.bc
   echo tp.exe, + >> b32.bc
   echo tp.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\ct.lib + >> b32.bc
   echo $(HBDIR)\lib\zlib.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
   echo $(HBDIR)\lib\libmisc.lib + >> b32.bc
   echo $(HBDIR)\lib\tip.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc
   
   echo $(FWDIR)\lib\tdata32.lib + >>b32.bc  
   
   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

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

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

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /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

#tpwin.res : tpwin.rc
#  $(BCDIR)\bin\brc32.exe -r tpwin.rc
 


It compiles the first prg file and then this:
Code: Select all  Expand view  RUN

[list]Lines 13676, Functions/Procedures 77
Generating C source output to 'obj\tp.c'...
Done.
    c:\borland\bcc55\bin\bcc32 -c -tWM -Ic:\xharbour\include -oobj\tp obj\tp.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
obj\tp.c:
Error E2209 c:\xharbour\include\hbvmpub.h 63: Unable to open include file 'assert.h'
Error E2209 c:\xharbour\include\hbdefs.h 58: Unable to open include file 'stdarg.h'
Error E2209 c:\xharbour\include\hbdefs.h 59: Unable to open include file 'stdio.h'
Error E2209 c:\xharbour\include\hbdefs.h 60: Unable to open include file 'stdlib.h'
Error E2209 c:\xharbour\include\hbdefs.h 61: Unable to open include file 'string.h'
Error E2209 c:\xharbour\include\hbsetup.h 61: Unable to open include file 'limits.h'
Error E2188 c:\xharbour\include\hbdefs.h 454: Expression syntax
Error E2257 c:\xharbour\include\hbdefs.h 476: , expected
Error E2139 c:\xharbour\include\hbvmpub.h 268: Declaration missing ;
Error E2141 c:\xharbour\include\hbapi.h 590: Declaration syntax error
Error E2451 obj\tp.c 377: Undefined symbol 'NULL'
Error E2141 obj\tp.c 377: Declaration syntax error
Error E2190 obj\tp.c 377: Unexpected }
Error E2190 obj\tp.c 377: Unexpected }
Error E2040 obj\tp.c 377: Declaration terminated incorrectly
Error E2190 obj\tp.c 1242: Unexpected }
Error E2190 obj\tp.c 1242: Unexpected }
Error E2109 obj\tp.c 1242: Not an allowed type in function hb_vm_SymbolInit_TP
*** 18 errors in Compile ***

** error 1 ** deleting .\obj\tp.OBJ
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: compiling

Postby ukoenig » Thu Jan 28, 2016 10:27 pm

I think, You defined a wrong Borland C
You are using < Borland C++ 5.5.1 >
You can download bcc582 within the forum

The make-file You are using defined :

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

best regards
Uwe :?:
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: compiling

Postby dtussman » Thu Jan 28, 2016 11:23 pm

thanks ukoenig, I got bcc582 installed but, when I run go.bat it tries to run the make file in bcc582/bin and there is no make.exe file in that folder! There is an hbmake which I tried but when I run that the screen just goes blank.
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: compiling

Postby Antonio Linares » Thu Jan 28, 2016 11:26 pm

You have to properly set the bcc config files:

viewtopic.php?f=17&t=13098
regards, saludos

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

Re: compiling

Postby dtussman » Fri Jan 29, 2016 6:30 pm

Thanks to Antonio I got the bcc7 files and was able to compile successfully all 250,000 lines of my source code. However, I am very confused about the libraries. Previously I was using a version of xharbour from 2007. I upgraded to an august 2015 version and I notice that all the library names have changed, and there is no obvious correspondence between the old names and the new names. But even if I just try to use all the new libraries I get error messages to the effect that the library "contains invalid 0MF record". None of the documentation or samples I could find address this.
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: compiling

Postby Antonio Linares » Fri Jan 29, 2016 7:18 pm

Usually you get the error "contains invalid 0MF record" when you use wrong libraries for the C compiler that you are using.

What libraries names are you using ?
regards, saludos

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

Re: compiling

Postby dtussman » Fri Jan 29, 2016 8:16 pm

Amazing Antonio! That was it, somehow I had downloaded the wrong files from xharbour. Now it all works. Thanks! Since I was using 8 year old versions of everything this is all new to me. Love the new Preview features but one strange thing--after previewing a report when I close the preview the dialog I was just at is now maximized.
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: compiling

Postby Antonio Linares » Fri Jan 29, 2016 9:25 pm

after previewing a report when I close the preview the dialog I was just at is now maximized


We have not been able to reproduce it here with our examples

Could you provide a small example to reproduce it ? thanks
regards, saludos

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

Re: compiling

Postby James Bott » Sat Jan 30, 2016 4:52 am

David,

when I close the preview the dialog I was just at is now maximized.


Are you sure it is a dialog and not a window?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: compiling

Postby dtussman » Sat Jan 30, 2016 7:31 pm

James!! You are there!!! I was wondering what happened to you. And yes, of course you are right, it is a window. Amazingly, with a couple of tips from Antonio I was able to get the program compiled with FWH 1507 and it runs fine after a few tweaks, issue with Preview being one of the few remaining.
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: compiling

Postby dtussman » Sat Jan 30, 2016 7:46 pm

James, Just added "nomaximize" when defining the window and that fixes the issue with Preview. No reason anyone would want to maximize that window anyway.
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: compiling

Postby Eroni » Wed Jul 29, 2020 8:00 pm

Hello everyone.
My project contains 650 prg files, use xHarbour 123, FWH1709 and BCC72, I would like to migrate to VSCode, what would be the best and fastest way to assemble a .bat file for compilation? Today I use xmate that generates internally without the need for a .bat file. Thankful in advance.
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 98
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil

Re: compiling

Postby nageswaragunupudi » Thu Jul 30, 2020 2:46 am

but one strange thing--after previewing a report when I close the preview the dialog I was just at is now maximized.


If you are referring to mdichild windows, please see this link:
viewtopic.php?f=6&t=38957
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10659
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests