Which C compiler and which Harbour should be used for FW?

Which C compiler and which Harbour should be used for FW?

Postby FWExplorer » Mon Jun 22, 2020 12:54 pm

Hi,

I saw references to Borland 7, in the FW batch files. Should I download that? I've been using BC5 for most Harbour development, but tried to work with Mingw (with Mingw, I kept getting various missing libraries & such).

Which Harbour version? I think there's an HB 5.3, but I've been using 5.2.

Can someone provide links to the recommended tools, for FW development?
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: Which C compiler and which Harbour should be used for FW?

Postby Rick Lipkin » Mon Jun 22, 2020 1:36 pm

Whether you use Harbour or xHarbour is a personal choice .. Here are two excellant links to find the latest compilers and libraries .. http://whosaway.com/ has both versions Harbour and xHarbour binaries .. I believe you will have to register your IP address with whosaway.com

http://xharbour.org/index.asp?page=down ... naries_win

http://whosaway.com/

In the fivewin\samples folder you will find the compile and link batch files and lots of good examples of FiveWin programs

Buildx.bat is for xHarbour
Build.bat is for Harbour

Cristobal has a very fine IDE you can download as well:
https://bitbucket.org/fivetech/fivewin- ... IVEDIT.EXE

Also
https://bitbucket.org/fivetech/fivewin- ... downloads/
xMate is a good IDE as well .. you will from it in /downloads

Resedit is a good resource editor
http://www.resedit.net/

Rick Lipkin
Last edited by Rick Lipkin on Mon Jun 22, 2020 1:44 pm, edited 3 times in total.
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Which C compiler and which Harbour should be used for FW?

Postby Antonio Linares » Mon Jun 22, 2020 1:39 pm

D.

We do recommend Microsoft Visual Studio Community 2019 as it is a great set of tools from Microsoft and work great with Harbour and FWH:
https://visualstudio.microsoft.com/

If you prefer to use Borland, then we do recommend bcc7. You can directly download it from Embarcadero.

You may select the right Harbour version to use from here:
http://forums.fivetechsupport.com/viewtopic.php?f=16&t=37147
http://forums.fivetechsupport.com/viewtopic.php?f=16&t=37148

You can also use MinGW for Windows. FWH supports the most recent versions.
regards, saludos

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

Re: Which C compiler and which Harbour should be used for FW?

Postby FWExplorer » Mon Jun 22, 2020 1:46 pm

Thanks Antonio and Rich,

I just found out (after starting the thread) that the FTDN distribution includes links to the latest Harbour and Borland tools. So I'm all set on that, for now.

So the only question is what C Compiler to use. You're saying (Antonio) that your preferred compiler is VS 2019 ; I think I have that, but generally try to avoid dealing with Microsoft. But I'll keep an open mind, and give it a try.

T & R,

FWExp.


Antonio Linares wrote:D.

We do recommend Microsoft Visual Studio Community 2019 as it is a great set of tools from Microsoft and work great with Harbour and FWH:
https://visualstudio.microsoft.com/

If you prefer to use Borland, then we do recommend bcc7. You can directly download it from Embarcadero.

You may select the right Harbour version to use from here:
http://forums.fivetechsupport.com/viewtopic.php?f=16&t=37147
http://forums.fivetechsupport.com/viewtopic.php?f=16&t=37148

You can also use MinGW for Windows. FWH supports the most recent versions.
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: Which C compiler and which Harbour should be used for FW?

Postby Rick Lipkin » Mon Jun 22, 2020 1:55 pm

Microsoft visual Studio is a good IDE as Antonio mentions .. however, you can just download the MSVC c++ compiler from http://whosaway.com/ and you can use BuildHM.bat or BuildXM.bat in the fivewin\samples folder.

For a new FW user .. I would look at the IDE's

Microsoft VS
FiveEdit
xMate

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Which C compiler and which Harbour should be used for FW?

Postby FWExplorer » Tue Jun 23, 2020 11:32 am

Huh. Xmate is still around? I remember it from way back.


Rick Lipkin wrote:Microsoft visual Studio is a good IDE as Antonio mentions .. however, you can just download the MSVC c++ compiler from http://whosaway.com/ and you can use BuildHM.bat or BuildXM.bat in
the fivewin\samples folder.

For a new FW user .. I would look at the IDE's

Microsoft VS
FiveEdit
xMate

Rick Lipkin
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: Which C compiler and which Harbour should be used for FW?

Postby Antonio Linares » Tue Jun 23, 2020 11:37 am

FivEdit is very friendly, free and developed by the FiveTech team:

https://bitbucket.org/fivetech/fivewin-contributions/downloads/FIVEDIT.EXE
regards, saludos

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

Re: Which C compiler and which Harbour should be used for FW?

Postby TimStone » Wed Jun 24, 2020 4:27 pm

For many years, I have used Microsoft Visual Studio + Harbour + FWH. I have always been pleased. I also have an older version of the commercial xHarbour.

All of my work is done with the Microsoft build for a simple reason. My clients all use Windows, and no other product is designed to be 100% compatible with the current OS. Visual Studio is constantly updated and provides for every feature in WIndows development. Some options are simply not available with other compilers. For example, a few years ago, we wanted a photo taking option in our product. Antonio quickly made it happen with the ability to use capabilities supplied in Visual Studio. No other tools supported it, but my clients have had the benefit of using it now for several years.

I do my editing in Ultra Edit Studio, and my builds for distribution are created with a make file called from UES. However, for testing, I have the program setup in Visual Studio. So, the process is simple: Edit in UES, then click on the build option in VS which compiles changed files, links, and starts the program. It is so fast and easy.

Thankfully we have options, but I prefer this one. It works, it's easy to use, there is no cost for the Visual Studio, There are also options. You can work 100% in Visual Studio, and even have it use your preferred editor. Updates are steady, and apply automatically in VS, so you never lose time reconfiguring.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Which C compiler and which Harbour should be used for FW?

Postby Eroni » Fri Jul 31, 2020 1:01 pm

TimStone wrote:For many years, I have used Microsoft Visual Studio + Harbour + FWH. I have always been pleased. I also have an older version of the commercial xHarbour.

All of my work is done with the Microsoft build for a simple reason. My clients all use Windows, and no other product is designed to be 100% compatible with the current OS. Visual Studio is constantly updated and provides for every feature in WIndows development. Some options are simply not available with other compilers. For example, a few years ago, we wanted a photo taking option in our product. Antonio quickly made it happen with the ability to use capabilities supplied in Visual Studio. No other tools supported it, but my clients have had the benefit of using it now for several years.

I do my editing in Ultra Edit Studio, and my builds for distribution are created with a make file called from UES. However, for testing, I have the program setup in Visual Studio. So, the process is simple: Edit in UES, then click on the build option in VS which compiles changed files, links, and starts the program. It is so fast and easy.

Thankfully we have options, but I prefer this one. It works, it's easy to use, there is no cost for the Visual Studio, There are also options. You can work 100% in Visual Studio, and even have it use your preferred editor. Updates are steady, and apply automatically in VS, so you never lose time reconfiguring.

Tim


Hi Tim
I've been thinking about migrating to MSVC for a long time, and this text of yours inspired me a lot, I would like to know more details about your environment, do you use the MSVC IDE? I started MSVC 2017 about a year ago for small mobile applications, and I would like to migrate my project in xHarbour to this environment. My current project (over 30 years old) has 654 PRG, use BCC74 and xHarbour123. My idea is to switch to MSVC and Harbour32. Could you help me find more information on how to compile? Thank you 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: Which C compiler and which Harbour should be used for FW?

Postby TimStone » Fri Jul 31, 2020 7:22 pm

I use the following:
+ FiveWin
+ Microsoft Visual Studio 2019
+ Ultra Edit Studio
+ Harbour

Here is how I work with it. I use UE Studio for all of my editing. It's certainly not the only option, but it works well for me.

My project is also loaded into Visual Studio. When I make edits to the UES code, and save it, then I do a quick build with Visual Studio ( one button click ) to test my work.

When I'm ready to do a release of the application ( usually an update ), I have a button in UES that executes a batch file, setting the environment, and then it executes the .mak file. It's fast, and another button will move the build to the distribution folder.

There are many options available. You could distribute what you build in MSVS, and you can even incorporate your editor into the Visual Studio interface. YAs Antonio said, there is a constantly evolving editor on this forum that is designed for FW and many people use it.

I would suggest you start by downloading Visual Studio 2019 Community. It is free. I use it because it is the most tightly intertwined with Windows 10 which is what all my clients have on their systems. I believe the setup info is still available in the FWH files, but if not, feel free to email me and I'll send over specific guidance. Once you have it setup you can try a build and see what happens with your existing code. If you are using BCC proprietary controls, those will need to be changed.

The FWH libraries are automatically part of your download, and the Harbour build for MSVC is also available on the FTDN download page.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Which C compiler and which Harbour should be used for FW?

Postby Eroni » Sat Aug 01, 2020 8:39 pm

Tim,
I greatly appreciate your response. As I have some projects at MSVC 2017, I will first download MSVC 2019 and migrate my small C # projects to it. Then I will start working on migrating my project from xHarbour to MSVC, testing some code editors and putting together a compilation. I am posting my evolution in this process, if I need more help I will make contact. Again, grateful for your attention.
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: Which C compiler and which Harbour should be used for FW?

Postby TimStone » Sun Aug 02, 2020 12:25 am

For anyone interested in working with Visual Studio, here is a link to a detailed previous discussion. Please note it has a link to Antonio's early work on how to setup Visual Studio to work with FWH. Though it's an earlier version of VS, it is still appropriate today.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Which C compiler and which Harbour should be used for FW?

Postby Eroni » Sat Aug 22, 2020 3:21 pm

Hello everyone.
Posting my progress on migrating to MSVC, I first decided to learn about generating the project build.
Starting from the example in the folder fw \ makes I managed to build my first executable in MSVC 2019 written in .prg. The most important step was to correctly locate the necessary files, in my case:

Harbour folder: HBDIR = D: \ Tools \ Harbour32MSVC2017
FiveWin folder: FWDIR = D: \ Tools \ FWH1709
Compiler folder C: VCDIR = C: \ "Program Files (x86) \ Microsoft Visual Studio" \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.26.28801 \ bin \ Hostx86 \ x86
Include C folder: VCDIRINC = "C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.26.28801 \ include"
SDK folder: SDKDIR = "C: \ Program Files (x86) \ Windows Kits \ 10 \ Lib \ 10.0.18362.0 \ um \ x86"
SDK include folder: SDKDIRINC = "C: \ Program Files (x86) \ Windows Kits \ 10 \ Include \ 10.0.18362.0 \ um"
RC compiler folder: RCDIR = "C: \ Program Files (x86) \ Windows Kits \ 10 \ bin \ 10.0.18362.0 \ x86"

Modifying the test.mak file I generated the executable successfully, however, to adapt to my project, I need to change the structure of the folders:
Source files: folder. \ Source
.C and .obj files: \ obj folder

When making this change, I was no longer able to generate the exe, looking at the log files, I realized that the .obj files are not being located correctly.

Makefile:
Code: Select all  Expand view  RUN
HBDIR=D:\Tools\Harbour32MSVC2017
FWDIR=D:\Tools\FWH1709
VCDIR=C:\"Program Files (x86)\Microsoft Visual Studio"\2019\Community\VC\Tools\MSVC\14.26.28801\bin\Hostx86\x86
VCDIRINC="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include"
SDKDIR="C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86"
SDKDIRINC="C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um"
RCDIR="C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86"

.SUFFIXES: .PRG .C .OBJ .RC .RES

PRG =       \
source\one.PRG      \
source\two.PRG      \
source\three.PRG
#place here as many PRGs as needed

OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)

PROJECT: ONE.EXE

one.exe : $(OBJS) one.res
   echo $(OBJS) > msvc.tmp
   echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
   echo $(HBDIR)\lib\hbrtl.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbvm.lib  >> msvc.tmp
   echo $(HBDIR)\lib\gtgui.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hblang.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbmacro.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbrdd.lib  >> msvc.tmp
   echo $(HBDIR)\lib\rddntx.lib  >> msvc.tmp
   echo $(HBDIR)\lib\rddcdx.lib  >> msvc.tmp
   echo $(HBDIR)\lib\rddfpt.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbsix.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbdebug.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbcommon.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbpp.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbcpage.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbwin.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbcplr.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbpcre.lib >> msvc.tmp
   echo $(HBDIR)\lib\hbct.lib  >> msvc.tmp
   echo $(HBDIR)\lib\xhb.lib  >> msvc.tmp
   echo $(HBDIR)\lib\png.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbzlib.lib  >> msvc.tmp
   echo $(HBDIR)\lib\hbziparc.lib >> msvc.tmp
   echo $(HBDIR)\lib\hbmzip.lib >> msvc.tmp
   echo $(HBDIR)\lib\minizip.lib >> msvc.tmp
   echo $(HBDIR)\lib\hbtip.lib >> msvc.tmp
   echo $(HBDIR)\lib\hbzebra.lib >> msvc.tmp

   echo $(SDKDIR)\kernel32.lib  >> msvc.tmp
   echo $(SDKDIR)\user32.lib    >> msvc.tmp
   echo $(SDKDIR)\gdi32.lib     >> msvc.tmp
   echo $(SDKDIR)\winspool.lib  >> msvc.tmp
   echo $(SDKDIR)\comctl32.lib  >> msvc.tmp
   echo $(SDKDIR)\comdlg32.lib  >> msvc.tmp
   echo $(SDKDIR)\advapi32.lib  >> msvc.tmp
   echo $(SDKDIR)\shell32.lib   >> msvc.tmp
   echo $(SDKDIR)\ole32.lib     >> msvc.tmp
   echo $(SDKDIR)\oleaut32.lib  >> msvc.tmp
   echo $(SDKDIR)\uuid.lib      >> msvc.tmp
   echo $(SDKDIR)\odbc32.lib    >> msvc.tmp
   echo $(SDKDIR)\odbccp32.lib  >> msvc.tmp
   echo $(SDKDIR)\iphlpapi.lib  >> msvc.tmp
   echo $(SDKDIR)\mpr.lib       >> msvc.tmp
   echo $(SDKDIR)\version.lib   >> msvc.tmp
   echo $(SDKDIR)\wsock32.lib   >> msvc.tmp
   echo $(SDKDIR)\msimg32.lib   >> msvc.tmp
   echo $(SDKDIR)\oledlg.lib    >> msvc.tmp
   echo $(SDKDIR)\psapi.lib     >> msvc.tmp
   echo $(SDKDIR)\gdiplus.lib   >> msvc.tmp
   echo $(SDKDIR)\winmm.lib     >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

   $(VCDIR)\link @msvc.tmp /out:One.exe /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt > link.log
   @type link.log

one.res : one.rc
   $(RCDIR)\rc.exe -r -d__FLAT__ one.rc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
  $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
 


Part of compiler.log file error:
Code: Select all  Expand view  RUN
one.c
three.c
two.c
Gerando C¢digo...
    echo source\one.OBJ      source\two.OBJ      source\three.OBJ > msvc.tmp
    echo D:\Tools\FWH1709\lib\FiveH32.lib D:\Tools\FWH1709\lib\FiveHC32.lib >> msvc.tmp
    echo D:\Tools\Harbour32MSVC2017\lib\hbrtl.lib  >> msvc.tmp
    echo D:\Tools\Harbour32MSVC2017\lib\hbvm.lib  >> msvc.tmp
    echo D:\Tools\Harbour32MSVC2017\lib\gtgui.lib  >> msvc.tmp
 


Problem is here: "echo source\one.OBJ source\two.OBJ source\three.OBJ > msvc.tmp"

Would anyone know how to fix this?

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: Which C compiler and which Harbour should be used for FW?

Postby TimStone » Sat Aug 22, 2020 4:55 pm

Please email me directly with your question. I have been on vacation and don't look closely at the forum but I respond to emails immediately. I can answer your questions and send some examples. tim at gtstone period com or timstone at masterlinksoftware period com. I'm happy to help.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Which C compiler and which Harbour should be used for FW?

Postby Eroni » Mon Aug 31, 2020 6:18 pm

Hello everyone.
I managed to generate an executable and also a library using MSVC to use in my projects. Thanks again Tim.
The next step now is to migrate my main software, which has many sources that will need some minor modifications because of some functions that exist only in xHarbour, such as GLOBAL variables, operators (IN). I believe that it would be better to work this within the Visual Studio environment. Suggestions are very welcome.
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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

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