Recompiling under HMG 3.0.35

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Recompiling under HMG 3.0.35

Post by CCH4CLIPPER »

Hi All

Just downloaded 3.0.35 and tried recompiling an EXE which worked perfectly in June 2009.

I have noticed that *.hpj has been change to *.hbp... not an issue.

But, I am stuck with the following functions not supported

1. MSGINFO()
2. STRTRAN()

Any help will be appreciated :-)

CCH
http://cch4clipper.blogspot.com
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Recompiling under HMG 3.0.35

Post by mol »

I've tried in my app strtran and msginfo and both of them link and work correctly.
You should look in your sources.

Marek
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: Recompiling under HMG 3.0.35

Post by CCH4CLIPPER »

Hi Marek

Source :

FUNCTION Main(cFile, cSecondParam, cThirdParam, cFourthParam, cFifthParam, cCoy_CodeParam )

MsgInfo('Ready to print '+cFile)

Error Message

Error BASE/1081 Argument error : +

This code compiles perfectly in HMG 2.x

CCH
http://cch4cipper.blogspot.com
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Recompiling under HMG 3.0.35

Post by mol »

I'm out of office now, but, I think it is caused by missing main window definition. try to define main window as dummy
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: Recompiling under HMG 3.0.35

Post by CCH4CLIPPER »

Hi Marek

A silly question, how does one define main window as dummy ?
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Recompiling under HMG 3.0.35

Post by sudip »

Hi CCH,

After a long time I see your post :D

Have you clicked on Project Menu -> Reset Project Incremental Data?

Or please check valtype(cFile)

I guess it's a Compile time error. If above mentioned solutions are not helpful, can you please send a small copy of your source code.

Thanks in advance :)
With best regards,
Sudip
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Recompiling under HMG 3.0.35

Post by mol »

Have you called you app after compilation with parameter?
If not, you should test if cFile is passed, eg:

if type('cFile') == "C"
Msginfo('Ready to print '+cFile)
endif
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Recompiling under HMG 3.0.35

Post by esgici »

Hello CCH4

Welcome back :)

I'm agree with Sudip and Marek; your MsgInfo() problem like a "type mismatch" error.

Another way for locate error, may be using MsgMulti() with a little syntax change :

MsgMulti( { 'Ready to print ', cFile } )

( MgsMulti() is a my humble contribution, you can find it in the forum )

STRTRAN() is a Harbour module, not HMG. May be required :

REQUEST STRTRAN

or please check your parameters sent to function; does they are correct type and sequence ?

Yes, .hpj extension changed to .hbp because we are using anymore hbmk2 of Harbour for building applications :)

Hearing you again is very nice, welcome again :D

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: Recompiling under HMG 3.0.35

Post by CCH4CLIPPER »

Hi Marek/Sudip/Escigi

It looks as if the compilation via HMG 3 is much stricter in that it validates the value of cFile as if it is a runtime.

By addiing if valtype(cFile) == "C" wherever cFile is used solves the problem.

BTW, the resultant EXE is much faster than HMG2. I wonder whether it is due to HB2.0 being used :-)

TQVM for the speedy response and making me feel welcome on this forum :-)

Cheers

CCH
http://cch4clipper.blogspot.com
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Recompiling under HMG 3.0.35

Post by sudip »

CCH4CLIPPER wrote:Hi Marek/Sudip/Escigi

It looks as if the compilation via HMG 3 is much stricter in that it validates the value of cFile as if it is a runtime.

By addiing if valtype(cFile) == "C" wherever cFile is used solves the problem.

BTW, the resultant EXE is much faster than HMG2. I wonder whether it is due to HB2.0 being used :-)

TQVM for the speedy response and making me feel welcome on this forum :-)

Cheers

CCH
http://cch4clipper.blogspot.com
You are correct :)
With best regards,
Sudip
Post Reply