Hello,
Can xharbour work with gcc (mingw)? Or is that only possible with harbour?
Pieter
Hello,
Can xharbour work with gcc (mingw)? Or is that only possible with harbour?
Pieter
Pieter,
I don't know if xharbour supports MinGW.
Surely Enrico may help us on this
Enrico, Okรฉ!, I have send an email to you. Pieter
//helloworld.prg
PROCEDURE Main()
ย ย ? "Hello World!"
RETURNPieter,
Please review FWH\samples\buildg.bat to use MinGW
You can easily modify it to use it with xHarbour
Antonio, Thanks,
I have modified buildg.bat:
if "%fwh%" == "" set fwh=C:\XharbourWithMingwTestProgram\fwh
set hdir=C:\XharbourWithMingwTestProgram\xhb10146_mingw53\xharbour
set hdirc=%hdir%\bin\harbour.exe
set hlibs=%hdir%\lib\gcc
set mingw=C:\XharbourWithMingwTestProgram\mingw530\MINGW530
set path=C:\XharbourWithMingwTestProgram\mingw530\MINGW530\bin
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
?FiveWin for Harbour 15.01 and GCC - Jan. 2015 Harbour development power โโ
?(c) FiveTech, 1993-2015 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 โโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ?
ย โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ?
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20160314)
Copyright 1999-2015, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'helloworld.prg' and generating preprocessed output to 'helloworld.ppo
'...
Generating C source output to 'helloworld.c'...
Done.
Lines 5, Functions/Procedures 1, pCodes 7
gcc: error: unrecognized command line option '-mno-cygwin'
* Link errors *
C:\XharbourWithMingwTestProgram>
I think the problem is with set hlibs=%hdir%\lib\gcc, I don't see a gcc directory in C:\XharbourWithMingwTestProgram\xhb10146_mingw53\xharbour\lib
Is this the problem?
Pieter
# gcc make example for Windows, developed by FiveTech Software
hdir=e:\harbour\harbour
hdirc=$(hdir)\source\main\w32\mingw32\harbour.exe
hlibs=$(hdir)\lib\w32\mingw32
fwh=e:\fwh
mingw=e:\mingw
fwfiles=-lfivehg -lfivehgc
w32files=-ldll -lsocket -luser32 -lwinspool -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -loleaut32 -luuid \-lwinmm -lvfw32 -lwsock32 -lmsimg32
hbfiles=-lhbbtree -lhbclipsm -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbcurl -lhbfbird -lhbgd -lhbhpdf \-lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmisc -lhbmsql -lhbmysql -lmysqldll -lhbmzip \-lhbnf -lhbodbc -lodbc32 -lhbpcre -lhbpgsql -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 \-lhbtip -lhbusrrdd -lhbvm -lhbvpdf -lhbw32 -lhbzlib -lrddado -lrddads -lrddcdx -lrddfpt -lrddntx -lxhb
libraries=$(fwfiles) -lgtgui $(w32files) $(hbfiles)
libspath=-L$(mingw)\lib -L$(hlibs) -L$(fwh)\lib
all : brwtools.exe
ย ย brwtools.exe
PRG_OBJS = ./obj/brwtools.c ย \
ย ย ./obj/errsysw.c
C_OBJS = ./obj/brwtools.o \
ย ย ./obj/errsysw.o
#C_OBJS = ./obj/one.o \
# ย ย ย ย ./obj/two.o \
# ย ย ย ย ./obj/three.o
brwtools.exe : $(PRG_OBJS) $(C_OBJS)
#if not exist brwtools.rc $(mingw)\bin\gcc -obrwtools.exe ./obj/brwtools.o ./obj/errsysw.o \-Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group
#if exist brwtools.rc $(mingw)\bin\gcc =
#ย ย -obrwtools.exe
#ย ย ./obj/brwtools.o
#ย ย ./obj/errsysw.o _one.o \-Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group
test.exe : $(PRG_OBJS) $(C_OBJS)
# ย if not exist one.rc $(mingw)\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o \-Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group
# ย if exist one.rc $(mingw)\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o _one.o \-Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group
#if not exist brwtools.rc $(mingw)\bin\gcc -obrwtools.exe ./obj/brwtools.o ./obj/errsysw.o \-Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group
#if exist brwtools.rc $(mingw)\bin\gcc -obrwtools.exe ./obj/brwtools.o ./obj/errsysw.o _one.o \-Wall -s -mwindows $(libspath) -mno-cygwin -Wl,--start-group $(libraries) -Wl,--end-group
./obj/%.c : %.prg
if not exist obj mkdir obj $(hdir)\source\main\w32\mingw32\harbour.exe $< -o$@ -n -I$(hdir)\include -I$(fwh)\include
ย ย
./obj/%.o : ./obj/%.c
ย ย gcc -c -o$@ -I$(hdir)\include $< ย ย
ย ย
./obj/%.o : %.c
ย ย gcc -c -o$@ -I$(hdir)\include $<Pieter,
all my tests are done with XHARBOUR.
I will have a closer look at my old tests and check with NEW fwh.
regards
Uwe ![]()
Pieter,
Please replace this:
I think the problem is with set hlibs=%hdir%\lib\gcc
with this:
set hlibs=%hdir%\lib
Antonio,
I did set hlibs=%hdir%\lib
Still the same error.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
?FiveWin for Harbour 15.01 and GCC - Jan. 2015 Harbour development power โโ
?(c) FiveTech, 1993-2015 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 โโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ?
ย โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ?
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20160314)
Copyright 1999-2015, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'helloworld.prg' and generating preprocessed output to 'helloworld.ppo
'...
Generating C source output to 'helloworld.c'...
Done.
Lines 5, Functions/Procedures 1, pCodes 7
gcc: error: unrecognized command line option '-mno-cygwin'
* Link errors *
C:\XharbourWithMingwTestProgram>
In hlibs=%hdir%\lib there are only .a extensions:
libbmdbfcdx.a
libbmsixcdx.a
libcodepage.a
etc.
I will think further:D
Pieter
Pieter,
Remove the flag '-mno-cygwin' when calling gcc
Antonio,
I already tried that, I get this error.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
?FiveWin for Harbour 15.01 and GCC - Jan. 2015 Harbour development power โโ
?(c) FiveTech, 1993-2015 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 โโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ?
ย โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ?
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20160314)
Copyright 1999-2015, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'helloworld.prg' and generating preprocessed output to 'helloworld.ppo
'...
Generating C source output to 'helloworld.c'...
Done.
Lines 5, Functions/Procedures 1, pCodes 7
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbcommon
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbcpage
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbcplr
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbct
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbdebug
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbhsx
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhblang
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbmacro
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbmainstd
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbpcre
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbpp
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbrdd
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbrtl
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbtip
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbusrrdd
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbvm
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbwin
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbzlib
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lrddcdx
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lrddfpt
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lrddntx
C:/XharbourWithMingwTestProgram/mingw530/MINGW530/bin/../lib/gcc/i686-w64-mingw3
2/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lxhb
collect2.exe: error: ld returned 1 exit status
* Link errors *
C:\XharbourWithMingwTestProgram>
But maybe this error is closer to the solution.
Pieter
Pieter,
Please post here your modified batch file