by andijahja » Tue Aug 31, 2010 1:14 pm
Hi Stefan,
It works fine fine with BCC 5.82. You have to compile in C++ mode. So:
1. Add -P compiler switch to BCC
2. For the missing declaration, please add #include "hbapiitm.h", just under #include "hbapi.h"
Best regards,
Andi
Here is the Batch file, just in case:
------ cut ------
@echo off
SET HARBOURDIR=..\..\DEV
SET HARBOURLIB=%HARBOURDIR%\lib
SET HARBOUREXE=%HARBOURDIR%\bin\harbour.exe
SET _PATH=%PATH%
SET CC_DIR=..\..\BORLAND\BCC58
SET PATH=%CC_DIR%\BIN;%PATH%
SET _MYLIB=zlib.lib rdd.lib hbsix.lib sixcdx.lib hsx.lib usrrdd.lib dbfntx.lib dbfcdx.lib dbffpt.lib rtl.lib vm.lib gtgui.lib lang.lib macro.lib common.lib pcrepos.lib pp.lib hbzip.lib %CC_DIR%\lib\cw32.lib %CC_DIR%\lib\import32.lib
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 /gc0 /es2 /w
if not exist %1.c goto end
BCC32 -P -I%HARBOURDIR%\include -6 -OS -O2 -c -o%1.obj %1.c
if not exist %1.obj goto end
if exist %1.res DEL %1.res
if exist %1.rc BRC32 /r %1.rc /fo %1.res
if exist %1.res set RESFILE=%1.res
ILINK32 -aa -Tpe -x -Gn -L%HARBOURLIB% %1.obj,%1.exe,,%_MYLIB% c0w32.obj,,%RESFILE%
:success
if exist %1.exe echo %1.exe succesfully built
if exist %1.exe echo.
goto end
:syntax
echo.
echo Syntax: HB58 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 RESFILE=
SET CC_DIR=
------ cut ------
Andi