hi,
under XBase++ i can do this
#IFDEF FULLDEMO
PROCEDURE Main
...
RETURN
#ENDIFand compile/link using
COMPILE_FLAGS = /q /w /o\OBJ\ /DFULLDEMOthis create #DEFINE FULLDEMO at Runtime
Question : can i do this with harbour/Build64.BAT ?
Jimmy
hi,
under XBase++ i can do this
#IFDEF FULLDEMO
PROCEDURE Main
...
RETURN
#ENDIFand compile/link using
COMPILE_FLAGS = /q /w /o\OBJ\ /DFULLDEMOthis create #DEFINE FULLDEMO at Runtime
Question : can i do this with harbour/Build64.BAT ?
Dear Jimmy,
Yes, Harbour has the same feature. The compiler option is -d<id>[=<value>], it defines the symbol before compiling, exactly like #define at the top of the PRG.
Your source stays the same:
#ifdef FULLDEMO
PROCEDURE Main
...
RETURN
#endifThen add the option to the Harbour command line:
harbour myprog.prg /n /w /q /dFULLDEMO /i%HDIR%\include /i%FWDIR%\includeIn a batch file like BUILD64.BAT you have to put /dFULLDEMO in the line that calls harbour.exe (not in the C compiler or linker line). If you want to pass it from the command line, you can use a parameter, for example BUILD64.BAT myprog FULLDEMO and in the batch use /d%2 (leave it out if %2 is empty). If you use hbmk2, the equivalent is -DFULLDEMO.
Note: I have not seen your BUILD64.BAT, so the exact line to change depends on how it calls Harbour. Please post the line with harbour if you want me to check it.
Regards,
FiveTech AI