IDE & Preprocessing

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
Jeff Stone
Posts: 44
Joined: Fri Jun 20, 2014 8:41 pm

IDE & Preprocessing

Post by Jeff Stone »

Hi Everyone,

After spending a chunk of time figuring out how to convert a VFP .DLL into Harbour and then getting C++ to properly interface with the .DLL, I'm now back to converting a VFP interface to HMG. I'm using the IDE to compile the application and as I'm trying to maintain the same code between VFP and Harbour/HMG as much as possible, I'm using a bunch of #translate/#command directives to convert certain VFP code to Harbour/HMG. One such #command is:
#command wait window [<msg>] timeout <xtime> => eti_timeout(<xtime>)
which is used to convert
wait window "" timeout .1
to
eti_timeout(.1)

If I preprocess the .prg with HBPP.exe, the wait window "" timeout .1 is successfully translated; however, when I try to compile with the HMG IDE, I'm getting: Error E0030 Syntax error "syntax error at 'TIMEOUT'

Any suggestions to help me correct his issue would be greatly appreciated.

Regards,

Jeff
Carlos Britos
Posts: 245
Joined: Sat Aug 02, 2008 5:03 pm

Re: IDE & Preprocessing

Post by Carlos Britos »

Hi
As far as I know HMG IDE dont use hbpp.exe, so check the versions of both hbpp.exe and harbour.exe
Also WAIT WINDOW is a HMG coomand and maybe exist a conflict there
Regards/Saludos, Carlos (bcd12a)
Jeff Stone
Posts: 44
Joined: Fri Jun 20, 2014 8:41 pm

Re: IDE & Preprocessing

Post by Jeff Stone »

Hi Carlos,

I understand what you are saying but my issue is that HMG doesn't seem to be effecting the Harbour preprocessor directives. Based on the use of #xcommand, #command, #xtranslate in i_window.ch in the HMG include directory and other HMG include files, it appears HMG does effect preprocessor directives. So, why are my directives not being effected? Do I need to compile via Build.bat instead of through the IDE?

Regards,

Jeff
Carlos Britos
Posts: 245
Joined: Sat Aug 02, 2008 5:03 pm

Re: IDE & Preprocessing

Post by Carlos Britos »

Jeff Stone wrote: I understand what you are saying but my issue is that HMG doesn't seem to be effecting the Harbour preprocessor directives.
HMG use harbour to compile.
Your .ch files are in the correct include folder ?
The #include file directive is defined in prg ?
The #include directives are in correct order ?
Try compiling a small sample (in the samples folder) with one command using Hmg IDE. Declare the command in the same sample.prg.
Take a look a ppo file. I don't remember if IDE has the ppo option, I don't have it at this moment. Or from the command line try with the option harbour -p and check the ppo file.
Regards/Saludos, Carlos (bcd12a)
Jeff Stone
Posts: 44
Joined: Fri Jun 20, 2014 8:41 pm

Re: IDE & Preprocessing

Post by Jeff Stone »

Hi Carlos,

Thanks for the suggestions. I found the issue. HMG has an include file i_window.ch which contains #xtranslate directives. These directives were being executed prior to my #translate directives both of which address WAIT WINDOW commands. Consequently, i_window.ch was changing the syntax of the statements that my #translate directives were seeking. HBPP.exe only operates on the specified .prg and will not INCLUDE and default system INCLUDE files. So, for anyone in the future with a similar issue, search all HMG INCLUDE\ files for #translate\#xtranslate\#command\#xcommand directives to see if such directives are changing your target statements.

Jeff
Post Reply