andijahja wrote:As we all know, Harbour developers are killing BCC support next year.
Rick Lipkin wrote:Antonio
I have considered migrating to Visual Studio unfortunately just about every Windows 7 and Windows 10 update roll-up contains multiple dot net security patches ... I may have to eventually migrate to Visual Studio ... I just dislike polluting my machine with all the bloat of dot net.
If someone could extract out ONLY the C++ compiler\Linker and load it as a stand alone compiler from visual studio I would probably jump in that direction.
Rick Lipkin
Rick Lipkin wrote:Andi
BRILLIANT !! Now that's what I'm talking About ... I may need some help getting the config correct and a working make file ..
Thanks
Rick Lipkin
@echo off
REM THIS IS MSVC VERSION
SET __VC__=15
REM THIS IS WHERE YOUR HARBOUR PATH IS
REM THIS IS FOR MY PRIVATE USE, ADJUST IT ACCORDINGLY AS PER YOUR MACHINE
SET HARBOURDIR=..\HRB-DEV
SET HARBOURLIB=%HARBOURDIR%\lib\VC%__VC__%
SET HARBOUREXE=%HARBOURDIR%\bin\VC%__VC__%\harbour.exe
REM THIS IS WHERE WE PUT MSVC COMMAND LINE
REM I PLACE IT IN D:\VC15
SET CC_DIR=D:\VC%__VC__%
SET _PATH=%PATH%
SET PATH=%CC_DIR%\BIN;%PATH%
SET _MYLIB=fivehc32.lib fivehcm.lib rddads.lib hbziparc.lib hbmzip.lib hbzlib.lib hbrdd.lib hbsix.lib hbhsx.lib rddntx.lib rddcdx.lib rddfpt.lib hbrtl.lib hbvm.lib gtgui.lib hblang.lib hbmacro.lib hbcommon.lib hbpcre2.lib hbpp.lib hbwin32.lib hbct.lib hbcplr.lib
SET COMPILERLIBS=imm32.lib msimg32.lib gdiplus.lib uuid.lib psapi.lib iphlpapi.lib version.lib shell32.lib kernel32.lib user32.lib advapi32.lib gdi32.lib winspool.lib ole32.lib oleaut32.lib ws2_32.lib mpr.lib winmm.lib comctl32.lib comdlg32.lib
REM THIS IS THE PATH TO FWH
SET FWHDIR=..\FWH
SET RESFILE=
if "%1" == "" goto syntax
if not exist %1.prg goto noexist
if not exist %HARBOUREXE% goto noharbour
if exist %1.exe del %1.exe
if exist %1.c del %1.c
%HARBOUREXE% %1 /q0 /n /i%HARBOURDIR%\include /i%FWHDIR%\INCLUDE /gc3 /es2 /w /p
if not exist %1.c goto end
CL -D__WIN32__ -DWIN32 -DHB_OS_WIN32 -I%CC_DIR%\INCLUDE -I%FWHDIR%\INCLUDE -I%HARBOURDIR%\include -c -Fo%1.obj %1.c
if not exist %1.obj goto end
if exist %1.res DEL %1.res
if exist %1.rc RC /i%CC_DIR%\INCLUDE /r /fo %1.res %1.rc
if exist %1.res set RESFILE=%1.res
LINK /SUBSYSTEM:WINDOWS /LIBPATH:%CC_DIR%\LIB /LIBPATH:%HARBOURLIB% /OUT:%1.exe %1.obj %_MYLIB% %COMPILERLIBS% %RESFILE%
:okay
if exist %1.bak del %1.bak
if exist %1.exe dir %1.exe
if exist %1.exe echo.
if exist %1.exe echo %1.exe succesfully built
if exist %1.exe echo.
goto end
:syntax
echo.
echo Syntax: VC program [ do not specify prg extension ]
echo.
goto end
:noexist
echo.
echo Cannot find %1.prg file
echo.
goto end
:noharbour
echo.
echo Cannot find Harbour.exe
echo.
goto end
:end
set PATH=%_PATH%
set _PATH=
set HARBOUREXE=
set HARBOURLIB=
set HARBOURDIR=
set _MYLIB=
SET FWHDIR=
SET CC_DIR=
SET __VC__=
SET RESFILE=
@echo off
SET __VC__=1564
SET HARBOURDIR=..\HRB-DEV
SET HARBOURLIB=%HARBOURDIR%\lib\VC%__VC__%
SET HARBOUREXE=%HARBOURDIR%\bin\VC%__VC__%\harbour.exe
SET _PATH=%PATH%
SET CC_DIR=..\VC%__VC__%
SET PATH=%CC_DIR%\BIN;%PATH%
REM CHECK FWH FILE NAME FOR MSVC64 AS FIVEH64.LIB AND FIVEHC64.LIB ARE JUST MY GUESS :)
SET _MYLIB=fiveh64.lib fivehc64.lib rddads.lib hbziparc.lib hbmzip.lib hbzlib.lib hbrdd.lib hbsix.lib hbhsx.lib rddntx.lib rddcdx.lib rddfpt.lib hbrtl.lib hbvm.lib gtgui.lib hblang.lib hbmacro.lib hbcommon.lib hbpcre2.lib hbpp.lib hbwin32.lib hbct.lib hbcplr.lib
SET COMPILERLIBS=imm32.lib msimg32.lib gdiplus.lib uuid.lib psapi.lib iphlpapi.lib version.lib shell32.lib kernel32.lib user32.lib advapi32.lib gdi32.lib winspool.lib ole32.lib oleaut32.lib ws2_32.lib mpr.lib winmm.lib comctl32.lib comdlg32.lib
SET FWHDIR=..\FWH
SET RESFILE=
if "%1" == "" goto syntax
if not exist %1.prg goto noexist
if not exist %HARBOUREXE% goto noharbour
if exist %1.exe del %1.exe
if exist %1.c del %1.c
%HARBOUREXE% %1 -D__64__ /q0 /n /i%HARBOURDIR%\include /i%FWHDIR%\INCLUDE /gc3 /es2 /w /p
if not exist %1.c goto end
cl -D__WIN32__ -DWIN32 -DHB_OS_WIN_64 -D_WIN64 -I%CC_DIR%\INCLUDE -I%FWHDIR%\INCLUDE -I%HARBOURDIR%\include -c -Fo%1.obj %1.c
if not exist %1.obj goto end
if exist %1.res DEL %1.res
if exist %1.rc rc /i%CC_DIR%\INCLUDE /d__64__ /r /fo %1.res %1.rc
if exist %1.res set RESFILE=%1.res
LINK /SUBSYSTEM:WINDOWS /LIBPATH:%CC_DIR%\LIB /LIBPATH:%HARBOURLIB% /OUT:%1.exe %1.obj %_MYLIB% %COMPILERLIBS% %RESFILE%
:okay
if exist %1.bak del %1.bak
if exist %1.exe dir %1.exe
if exist %1.exe echo.
if exist %1.exe echo %1.exe succesfully built
if exist %1.exe echo.
goto end
:syntax
echo.
echo Syntax: VC64 program [ do not specify prg extension ]
echo.
goto end
:noexist
echo.
echo Cannot find %1.prg file
echo.
goto end
:noharbour
echo.
echo Cannot find Harbour.exe
echo.
goto end
:end
set PATH=%_PATH%
set _PATH=
set HARBOUREXE=
set HARBOURLIB=
set HARBOURDIR=
set _MYLIB=
SET FWHDIR=
SET RESFILE=
SET CC_DIR=
SET __VC__=
byte-one wrote:Andi,
have you also a makefile-template for more then one .prg?
console example:
for single program: hbmk2 -plat=win -comp=bcc -lhbmainstd program1.prg
for multi prg program: hbmk2 -plat=win -comp=bcc -lhbmainstd program1.prg program2.prg
gui example:
for single program: hbmk2 -plat=win -comp=bcc -lhbmainwin program1.prg
for multi program: hbmk2 -plat=win -comp=bcc -lhbmainwin -lfive32 -lfivehc32 program1.prg program2.prg
example for many prg with response file:
hbmk2 -plat=win -comp=bcc -lhbmainwin -lfive32 -lfivehc32 @myprog.lnk
myprog.lnk is a text file which list your prg, example:
-- myprog.lnk --
program1.prg
propram2.prg
promram3.prg
-- myprog.lnk --
C:\fwh\samples>c:\\harbour\bin\hbmk2 -plat=win -comp=bcc -trace -lhbmainwin -Lc:\\fwh\lib -lfiveh32 -lfivehc32 -incpath=c:\\fwh\include testend.prg
hbmk2: Harbour compiler command (embedded):
(c:\harbour\bin\harbour.exe) -n2 testend.prg -oC:\Users\BYTE-ONE\AppData\Local\Temp\hbmk_jeve4z.dir\ -iC:\Program Files\Embarcadero\Studio\18.0\Include -iC:\Program Files\Embarcadero\Studio\18.0\Include\dinkumware -iC:\Program Files\Embarcadero\Studio\18.0\Include\windows\crtl -iC:\Program Files\Embarcadero\Studio\18.0\Include\windows\rtl -iC:\Program Files\Embarcadero\Studio\18.0\Include\windows\sdk -ic:\harbour\include -ic:\fwh\include -undef:.ARCH. -D__PLATFORM__WINDOWS -D__LITTLE_ENDIAN__ -D__ARCH32BIT__
Harbour 3.2.0dev (r1703231115)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'testend.prg'...
Lines 4736, Functions/Procedures 1
Generating C source output to 'C:\Users\BYTE-ONE\AppData\Local\Temp\hbmk_jeve4z.dir\testend.c'... Done.
hbmk2: C/C++ compiler command:
bcc32.exe -c -q -CP437 -d -O2 -OS -Ov -Oc -Oi -6 -tWM -w -Q -w-sig- -n"C:\Users\BYTE-ONE\AppData\Local\Temp\hbmk_jeve4z.dir" -I"C:\Program Files\Embarcadero\Studio\18.0\Include" -I"C:\Program Files\Embarcadero\Studio\18.0\Include\dinkumware" -I"C:\Program Files\Embarcadero\Studio\18.0\Include\windows\crtl" -I"C:\Program Files\Embarcadero\Studio\18.0\Include\windows\rtl" -I"C:\Program Files\Embarcadero\Studio\18.0\Include\windows\sdk" -Ic:\harbour\include -Ic:\fwh\include "C:\Users\BYTE-ONE\AppData\Local\Temp\hbmk_jeve4z.dir\testend.c"
C:\Users\BYTE-ONE\AppData\Local\Temp\hbmk_jeve4z.dir\testend.c:
hbmk2: Linker command:
ilink32.exe @C:\Users\BYTE-ONE\AppData\Local\Temp\abb81w.lnk
hbmk2: Linker script:
-Gn -Tpe -L"C:\Program Files\Embarcadero\Studio\18.0\Lib";"C:\Program Files\Embarcadero\Studio\18.0\Lib\PSDK";c:\harbour\lib;c:\\fwh\lib -ap c0x32.obj "C:\Users\BYTE-ONE\AppData\Local\Temp\hbmk_jeve4z.dir\testend.obj", testend.exe, nul, hbmainwin.lib fiveh32.lib fivehc32.lib hbextern.lib hbdebug.lib hbvm.lib hbrtl.lib hblang.lib hbcpage.lib gtcgi.lib gtpca.lib gtstd.lib gtwin.lib gtwvt.lib gtgui.lib hbrdd.lib hbuddall.lib hbusrrdd.lib rddntx.lib rddcdx.lib rddnsx.lib rddfpt.lib hbrdd.lib hbhsx.lib hbsix.lib hbmacro.lib hbcplr.lib hbpp.lib hbcommon.lib kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib iphlpapi.lib winspool.lib comctl32.lib comdlg32.lib shell32.lib uuid.lib ole32.lib oleaut32.lib mpr.lib winmm.lib mapi32.lib imm32.lib msimg32.lib wininet.lib hbpcre.lib hbzlib.lib cw32mt.lib import32.lib, ,
Turbo Incremental Link 6.75 Copyright (c) 1997-2016 Embarcadero Technologies, Inc.
Error: 'C:\FWH\LIB\FIVEH32.LIB' enthlt einen ung ltigen OMF-Record, Typ 0x21 (mglicherweise COFF)
hbmk2: Error: Running linker. 2
ilink32.exe @C:\Users\BYTE-ONE\AppData\Local\Temp\abb81w.lnk
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for xHarbour 17.07 (MSVC++) July 2017 xHarbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2017 for Microsoft Windows 9x/NT/2000/ME/XP/Vista/7/8 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=c:\xharbourM
set vcdir=c:\msvc17
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\vc\lib;%lib%
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log 2> warnings.log
@type clip.log
@type warnings.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
%vcdir%\bin\cl -TP -W3 -c /GA %1.c
:ENDCOMPILE
IF EXIST %1.rc %vcdir%\bin\rc -r -d__FLAT__ %1
echo %1.obj > msvc.tmp
rem c:\Fwh1707\lib\Fivehmx.lib c:\Fwh1707\lib\FiveHCM.lib >> msvc.tmp
echo c:\Fwh1707\lib\Fivehc32.lib c:\Fwh1707\lib\FiveHCM.lib >> msvc.tmp
echo %hdir%\lib\rtl.lib >> msvc.tmp
echo %hdir%\lib\vm.lib >> msvc.tmp
echo %hdir%\lib\gtgui.lib >> msvc.tmp
echo %hdir%\lib\lang.lib >> msvc.tmp
echo %hdir%\lib\macro.lib >> msvc.tmp
echo %hdir%\lib\rdd.lib >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib >> msvc.tmp
echo %hdir%\lib\debug.lib >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
echo %hdir%\lib\png.lib >> msvc.tmp
rem ... can not find this in xHarbourM
rem echo %hdir%\lib\hbzlib.lib >> msvc.tmp
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\vc\rddads.lib >> msvc.tmp
rem echo %hdir%\lib\vc\ace32.lib >> msvc.tmp
rem echo %vcdir%\lib\msvcrt.lib >> msvc.tmp
rem echo %vcdir%\lib\kernel32.lib >> msvc.tmp
rem echo %vcdir%\lib\user32.lib >> msvc.tmp
rem echo %vcdir%\lib\gdi32.lib >> msvc.tmp
rem echo %vcdir%\lib\winspool.lib >> msvc.tmp
rem echo %vcdir%\lib\comctl32.lib >> msvc.tmp
rem echo %vcdir%\lib\comdlg32.lib >> msvc.tmp
rem echo %vcdir%\lib\advapi32.lib >> msvc.tmp
rem echo %vcdir%\lib\shell32.lib >> msvc.tmp
rem echo %vcdir%\lib\ole32.lib >> msvc.tmp
rem echo %vcdir%\lib\oleaut32.lib >> msvc.tmp
rem echo %vcdir%\lib\uuid.lib >> msvc.tmp
rem echo %vcdir%\lib\odbc32.lib >> msvc.tmp
rem echo %vcdir%\lib\odbccp32.lib >> msvc.tmp
rem echo %vcdir%\lib\mpr.lib >> msvc.tmp
rem echo %vcdir%\lib\msimg32.lib >> msvc.tmp
rem echo %vcdir%\lib\oledlg.lib >> msvc.tmp
rem echo %vcdir%\lib\psapi.lib >> msvc.tmp
rem echo %vcdir%\lib\version.lib >> msvc.tmp
rem microsoft C++ libs
rem echo %vcdir%\lib\imm32.lib >> msvc.tmp
echo %vcdir%\lib\msimg32.lib >> msvc.tmp
rem echo %vcdir%\lib\gdiplus.lib >> msvc.tmp
echo %vcdir%\lib\uuid.lib >> msvc.tmp
echo %vcdir%\lib\psapi.lib >> msvc.tmp
rem echo %vcdir%\lib\msimg32.lib >> msvc.tmp
echo %vcdir%\lib\iphlpapi.lib >> msvc.tmp
echo %vcdir%\lib\version.lib >> msvc.tmp
echo %vcdir%\lib\shell32.lib >> msvc.tmp
echo %vcdir%\lib\kernel32.lib >> msvc.tmp
echo %vcdir%\lib\user32.lib >> msvc.tmp
echo %vcdir%\lib\advapi32.lib >> msvc.tmp
echo %vcdir%\lib\gdi32.lib >> msvc.tmp
echo %vcdir%\lib\winspool.lib >> msvc.tmp
echo %vcdir%\lib\ole32.lib >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib >> msvc.tmp
rem echo %vcdir%\lib\ws2_32.lib >> msvc.tmp
echo %vcdir%\lib\mpr.lib >> msvc.tmp
rem echo %vcdir%\lib\winmm.lib >> msvc.tmp
echo %vcdir%\lib\comctl32.lib >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib >> msvc.tmp
echo %vcdir%\lib\odbc32.lib >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib >> msvc.tmp
echo %vcdir%\lib\oledlg.lib >> msvc.tmp
IF EXIST %1.res echo %1.res >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /NODEFAULTLIB:LIBC /nologo /subsystem:windows /force:multiple
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
@del msvc.tmp
:LINKERROR
ECHO * There are errors
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensión PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for xHarbour 17.07 (MSVC++) July 2017 xHarbour development power ³Ü
³ (c) FiveTech, 1993-2017 for Microsoft Windows 9x/NT/2000/ME/XP/Vista/7/8 ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
Copyright 1999-2017, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
2000
Generating C source output to 'tutor01.c'...
Done.
Lines 13, Functions/Procedures 1, pCodes 14
tutor01.c
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in LIBCMT.lib(matherr.obj); second definition ignored
Creating library tutor01.lib and object tutor01.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
tutor01.obj : error LNK2001: unresolved external symbol _HB_FUN_TACTIVEX
Fivehc32.lib(UNICODE.obj) : error LNK2019: unresolved external symbol _hb_parvni referenced in function _HB_FUN_DRAWTEXTW
Fivehc32.lib(UNICODE.obj) : error LNK2019: unresolved external symbol _hb_parvnl referenced in function _HB_FUN_EXTTEXTOUTW
Fivehc32.lib(THEMES.obj) : error LNK2001: unresolved external symbol _hb_parvnl
Fivehc32.lib(HARBOURC.obj) : error LNK2001: unresolved external symbol _hb_parvnl
Fivehc32.lib(UNICODE.obj) : error LNK2019: unresolved external symbol _hb_storvc referenced in function _HB_FUN_GETCLASSINFOW
Fivehc32.lib(UNICODE.obj) : error LNK2019: unresolved external symbol _hb_storvni referenced in function _HB_FUN_GETCLASSINFOW
Fivehc32.lib(UNICODE.obj) : error LNK2019: unresolved external symbol _hb_storvnl referenced in function _HB_FUN_GETCLASSINFOW
Fivehc32.lib(THEMES.obj) : error LNK2001: unresolved external symbol _hb_storvnl
Fivehc32.lib(RIBBON.obj) : error LNK2001: unresolved external symbol _hb_storvnl
Fivehc32.lib(DIB.obj) : error LNK2019: unresolved external symbol _RegisterResource referenced in function _CreateDIBPalette
Fivehc32.lib(RIBBON.obj) : error LNK2001: unresolved external symbol _RegisterResource
MSVCRT.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
tutor01.exe : fatal error LNK1120: 8 unresolved externals
* There are errors
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 59 guests