HBMK2 Problem linking

Re: Editsource() Problem

Postby nageswaragunupudi » Mon Jun 08, 2020 4:38 pm

Thanks. I am able to build the exe now.
Yes, there is a problem.
How this linking affects the logic inside the fwh lib is puzzling.
Let me see.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editsource() Problem

Postby ricbarraes » Mon Jun 08, 2020 6:29 pm

Ok, thank you!

Let us know if you need help or anything :D
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: Editsource() Problem

Postby nageswaragunupudi » Mon Jun 08, 2020 6:37 pm

Please build this small program with buildh.bat and hbmk2 and see the difference.

Code: Select all  Expand view  RUN
#include "fivewin.ch"

function Main()

   local oCn, oRs
   local cSql, nAt := 0

   cSql  := "SELECT * FROM states AS st ORDER BY code LIMIT 5"
   HB_AtX( " ORDER BY | HAVING | LIMIT | GROUP ", cSql, .f., @nAt )
   ? nAt, cSql, SubStr( cSql, nAt )

 
return nil
 


In our library, we are depending on HB_AtX(...).
This Harbour function is returning different values with buildh.bat and hbmk2.
Please test and confirm.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editsource() Problem

Postby ricbarraes » Mon Jun 08, 2020 6:47 pm

Ok, we are testing it right now, just a moment
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: Editsource() Problem

Postby vilian » Mon Jun 08, 2020 6:49 pm

Yes, you are right. The exe generated with HBMK2 is returning 0(Zero) to nAt.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Editsource() Problem

Postby nageswaragunupudi » Mon Jun 08, 2020 6:57 pm

We request the hbmk2 experts to please see the hbp script and advise corrections to resolve this issue.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editsource() Problem

Postby vilian » Mon Jun 08, 2020 7:00 pm

Do you know where is HB_AtX() function ? which .lib ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Editsource() Problem

Postby cnavarro » Mon Jun 08, 2020 7:45 pm

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Editsource() Problem

Postby vilian » Mon Jun 08, 2020 7:53 pm

Thank you,
It's a really nice page!
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Editsource() Problem

Postby ricbarraes » Mon Jun 08, 2020 8:10 pm

thank you, it helped us to track the function.

but it seems to be inside some core Harbour library:

# Function Library
935) hb_AtX harbour

so we don't know for sure how to access this lib, or even if it's accessible for us.

Could help us finding it?

cnavarro wrote:http://www.elektrosoft.it/tutorials/Harbour-Reference-Guide/harbour-complete-functions-list.htm
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: Editsource() Problem

Postby nageswaragunupudi » Tue Jun 09, 2020 1:35 am

HB_AtX() is in hbrtl.lib.

HB_AtX() function is a regex function. While building with hbmk2 using the above script, some dummy function is being linked instead of the correct function.

It is possible to replace HB_AtX() in this particular case with a suitable FWH function like AAT() or FW_AT().

But we still do not know what other functions, particularly regex functions our FWH library will fail resulting in wrong behaviour. And you will all be complaining that it is a problem with our FWH library.

We can prove the functionality with buildh.bat.

I do not know hbmk2. You need to first consult experts and come out with a reliable hbp script. Till then, it is difficult for me to provide support if the application is built with hbmk2.

The caption "EditSource() problem" is misleading. There is no problem at all with EditSource. Please consider changing the title.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editsource() Problem

Postby ricbarraes » Tue Jun 09, 2020 2:09 am

Ok, I'll ask Vilian to change the title for a more specific now that everything is well understood.

Thank you guys for the support, we'll try to change that function but we are kinda concerned about the rest of our code

we didn't even know that hbmk2 has no relation to fivewin, in fact we thought it was an update over buildh...

Do you know anyone with more ackowledge about the hbmk2 that could help us with our hbp?

we are frequently visiting this website to get information about the hbmk2, but we couldn't recognize any parameter related to this issue

https://github.com/harbour/core/blob/master/utils/hbmk2/doc/hbmk2.en.md

let's wait for some hbmk2 expert to show up...

thank you again
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: Editsource() Problem

Postby nageswaragunupudi » Tue Jun 09, 2020 3:11 am

Another sample.
Try with both buildh.bat and hbmk2.exe and see the difference.
Code: Select all  Expand view  RUN
#include "fivewin.ch"

function Main()

   local cSql, aMatch

   cSql  := "SELECT * FROM customer WHERE AGE BETWEEN 50 AND 60 OR STATE = 'NY'"
   aMatch := hb_regex( "[a-z|0-9|_`]* between .* and ['|a-z|0-9|&|?|:]*", cSql, .f. )
   if aMatch == nil
      ? "function returned nil. It should return array"
   elseif Empty( aMatch )
      ? "function returns empty array"
   else
      ? "result:", aMatch[ 1 ]
   endif

return nil
 


This being the case it is not safe for you to build your release software with hbmk2 till you get expert guidance.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editsource() Problem

Postby Antonio Linares » Tue Jun 09, 2020 5:25 am

Please try to remove hbwin and -mt from the hbp file and let us know what you get
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Editsource() Problem

Postby nageswaragunupudi » Tue Jun 09, 2020 7:23 am

1. removing -mt made no difference.

2. removing -hbwin resulted in unresolved errors.

Code: Select all  Expand view  RUN
hbmk2: Error: Referenced, missing, but unknown function(s): WIN_OLEERRORTEXT(),
       WIN_OLEAUTO(), __OLEINVOKEMETHOD(), __OLEINVOKEPUT(), __OLEINVOKEGET(),
       WIN_OLEERROR(), __OLEISDISP(), __OLECREATEOBJECT(), WIN_P2N(),
       __OLEGETACTIVEOBJECT(), WAPI_MESSAGEBOX(), __OLEVARIANTNEW(),
       WIN_OSVERSIONINFO(), WIN_OSISNT(), WIN_OSISNT351(), WIN_OSISNT4(),
       WIN_OSIS2000ORUPPER(), WIN_OSIS2000(), WIN_OSISXP(),
       WIN_OSISWINXPORUPPER(), WIN_OSIS2003(), WIN_OSISVISTA(),
       WIN_OSISVISTAORUPPER(), WIN_OSIS7(), WIN_OSIS8(), WIN_OSIS9X(),
       WIN_OSIS95(), WIN_OSIS98(), WIN_OSISME(), WIN_OSISTSCLIENT(),
       WIN_OSNETREGOK(), WIN_OSNETVREDIROK(), WIN_ANSITOWIDE(),
       WIN_WIDETOANSI(), WIN_AXINIT(), WAPI_CREATEWINDOWEX(),
       WIN_AXGETCONTROL(), WAPI_OUTPUTDEBUGSTRING()
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 41 guests