Test ado rdd app
Posted: Wed Jun 24, 2015 11:31 am
Hello
Goal:
To get an working example of adorrdd
Background information:
-Borland 5.82 compiler
-Fivewin 2015
-Xharbour 1.2.3 Intl. (SimpLex) (Build 20150213)
Action steps that I did:
-I Downloaded adordd-master.zip from file https://github.com/AHFERREIRA/adordd
-I extracted the content of adordd-master.zip in the folder "C:\Pieter\adorddtest"
-I copied the file buildx.bat from C:\Pieter\fwh\samples and renamed it to buildx-bcc582.bat
-I changed some code of buildx-bcc582.bat, so that I could compile and run tutor01.prg(just for testing the .bat file)
-I made a file called adorddtest.prg and I opened the file 01_README.pdf(the documentation of adordd)
Questions
Now I am missing some basic knowlegde about (X)Harbour Compilers, Linkers, .obj etc.:
Here, there is what I think I already know:
Commandline: C:\Pieter\adorddtest> buildx-bcc582 adorddtest
:
The (X)harbour compiler compiles adorddtest.prg to adorddtest.ppo and then the (X)harbour compiler compiles adorddtest.ppo to adorddtest.c.
:
%1.c is adordd.c, The borland 5.82 compiler compiles the .c into .obj
There is some code above that I don't know how to read exacly. So if you know some good educational sources I could read or listen/watch, that would be great.
What does b32.bc means?
I understand the principle that all kind of .lib files and other files have to be put in b32.bc
All the files (in b32.bc) are linked together and one executable (.exe) will be generated.
I tried the following thing:
Commandline: C:\Pieter\adorddtest>c:\Pieter\xharbour123\bin\harbour adordd /n /ic:\Pieter\fwh\include;c:\Pieter\xharbour123\include (To compile adordd.prg to adordd.c) (I noticed that adordd.ppo is not made)
I also tried it with in the buildx-bcc32.bat file. (here I got an adordd.ppo)
How can I compile adordd.c to adordd.obj?
after that I want to do something with
I noticed while writing this first post, I already learned something (without someone telling met something), this is probably because writing down questions as specific as possible is already useful.
adorddtest.prg:
buildx-bcc582.bat:
tutor01.prg

Goal:
To get an working example of adorrdd
Background information:
-Borland 5.82 compiler
-Fivewin 2015
-Xharbour 1.2.3 Intl. (SimpLex) (Build 20150213)
Action steps that I did:
-I Downloaded adordd-master.zip from file https://github.com/AHFERREIRA/adordd
-I extracted the content of adordd-master.zip in the folder "C:\Pieter\adorddtest"
-I copied the file buildx.bat from C:\Pieter\fwh\samples and renamed it to buildx-bcc582.bat
-I changed some code of buildx-bcc582.bat, so that I could compile and run tutor01.prg(just for testing the .bat file)
-I made a file called adorddtest.prg and I opened the file 01_README.pdf(the documentation of adordd)
Questions
Now I am missing some basic knowlegde about (X)Harbour Compilers, Linkers, .obj etc.:
Here, there is what I think I already know:
Commandline: C:\Pieter\adorddtest> buildx-bcc582 adorddtest
Code: Select all | Expand
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log
The (X)harbour compiler compiles adorddtest.prg to adorddtest.ppo and then the (X)harbour compiler compiles adorddtest.ppo to adorddtest.c.
Code: Select all | Expand
echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
%1.c is adordd.c, The borland 5.82 compiler compiles the .c into .obj
There is some code above that I don't know how to read exacly. So if you know some good educational sources I could read or listen/watch, that would be great.
What does b32.bc means?
Code: Select all | Expand
echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib + >> b32.bc
etc.
I understand the principle that all kind of .lib files and other files have to be put in b32.bc
Code: Select all | Expand
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
All the files (in b32.bc) are linked together and one executable (.exe) will be generated.
I tried the following thing:
Commandline: C:\Pieter\adorddtest>c:\Pieter\xharbour123\bin\harbour adordd /n /ic:\Pieter\fwh\include;c:\Pieter\xharbour123\include (To compile adordd.prg to adordd.c) (I noticed that adordd.ppo is not made)
I also tried it with
Code: Select all | Expand
%hdir%\bin\harbour adordd /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log
How can I compile adordd.c to adordd.obj?
after that I want to do something with
Code: Select all | Expand
echo adordd.obj + >> b32.bc
I noticed while writing this first post, I already learned something (without someone telling met something), this is probably because writing down questions as specific as possible is already useful.
adorddtest.prg:
Code: Select all | Expand
#include "FiveWin.ch"
#include "adordd.ch"
function Main()
MsgInfo( "Start Program" )
RddRegister("ADORDD",1)
RddSetDefault("ADORDD")
return nil
buildx-bcc582.bat:
Code: Select all | Expand
@ECHO OFF
CLS
ECHO 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커
ECHO ?FiveWin for xHarbour 15.01 - Jan. 2015 xHarbour development power 넵
ECHO ?(c) FiveTech, 1993-2015 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 넴
ECHO 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸?
ECHO 賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽?
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
if "%FWDIR%" == "" set FWDIR=c:\Pieter\fwh
if "%XHDIR%" == "" set XHDIR=c:\Pieter\xharbour123
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui
rem set hdir=%XHDIR%
rem set hdirl=%hdir%\lib
rem set bcdir=c:\bcc582
rem set fwh=%FWDIR%
set hdir=c:\Pieter\xharbour123
set hdirl=%hdir%\lib
set bcdir=c:\Pieter\bcc582
set fwh=c:\Pieter\fwh
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log
@type warnings.log
echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE
IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1
echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib + >> b32.bc
echo %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\ct.lib + >> b32.bc
echo %hdirl%\zlib.lib + >> b32.bc
echo %hdirl%\hbzip.lib + >> b32.bc
echo %hdirl%\libmisc.lib + >> b32.bc
echo %hdirl%\tip.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\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
IF EXIST %1.res echo %1.res >> b32.bc
rem uncomment this line to use the debugger and comment the following one
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT
:LINKERROR
ECHO * Linking errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi? PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
tutor01.prg
Code: Select all | Expand
// Typical Welcome message, from Windows!
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
MsgInfo( "Hello world from Harbour and FWH!" )
return nil
//----------------------------------------------------------------------------//