Page 1 of 1

Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 3:30 am
by mahfuzmurshed
Hi,

I am facing compilation error every time I try to compile any code after function main() line!

The same program compiles properly on Windows 10 PC.

Can any one help to overcome the error?

Best Regards

Mahfuz

Re: Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 6:25 am
by mahfuzmurshed
Sorry,

Error occurs during run time not in compile time.

Re: Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 6:31 am
by edk
Try to use "Procedure main" instead "Function main()". :?:

Re: Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 6:54 am
by mahfuzmurshed
Thanks for replay,

But there is no change in the error message.

Best Regards

Mahfuz

Re: Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 1:07 pm
by serge_girard
Mahfuz,

Which errormessage you get? I tried it and it works well.

Serge

Re: Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 1:21 pm
by serge_girard
Mahfuz,

By the way: welcome to our HMGforum!

Serge/Belgium

Re: Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 4:20 pm
by mahfuzmurshed
It also works for me when I compile and run it in Windows 10.

I have already send screen shot which I have got when I try to run the program. The interesting thing that any thing I write after function main() it stops there and show the screen I already send.

There is no error message I found! Simply the program stops at that line and if I click on Step button the a message "Invalid code" with the line number appears!

I am very confused what can I do to overcome this problem.

Best Regards

Mahfuz

Re: Compilation error on Win XP PC

Posted: Thu Jul 06, 2017 4:54 pm
by edk
It's on hmg 3.4.4? You have compiled with debugger. Try without debugger.

Re: Compilation error on Win XP PC

Posted: Fri Jul 07, 2017 3:16 am
by mahfuzmurshed
It is hmg 3.4.3 and I compile it with command line :
build aTest

I have tried with /d switch and without /d switch.

But get to same result.

Re: Compilation error on Win XP PC

Posted: Thu Jul 13, 2017 3:19 am
by mahfuzmurshed
Hi,
At last I have found the solution!!!

I found in the build.bat file the following line:
Build [ /n ] [ /d ] [ /c ] <program.prg> | <project.hbp> [<hbmk2 params>]

Then I studied the switches of hbmk2 and found a switch -b[-] which will enable/disable the debugger.

So, I use -b- switch at the end of my command line e.g. build /n /c test -b-

Thanks everyone who try to help me and also I think my solution may help others to overcome run time debugger problem.

Best Regards
Mahfuz