HBMK2 Problem linking

Re: HBMK2 Problem linking

Postby Antonio Linares » Mon Jun 15, 2020 2:12 pm

Ricardo,

If you use:

-ldflag=@libs.txt

then you can specify in libs.txt the libs and the order that you want
regards, saludos

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

Re: HBMK2 Problem linking

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

Sorry to bother you, Antonio...

I found in the documentation an explanation about this tag, but it seems pretty vague to me:

ldflags= space separated list of values as in -ldflag= option
ldflags+= space separated list of values as in -ldflag+= option


I already tried many ways to populate this .txt file and I'm getting linking errors every single time,

do you have any example or any other documentation describing how to do it?


Antonio Linares wrote:Ricardo,

If you use:

-ldflag=@libs.txt

then you can specify in libs.txt the libs and the order that you want


Thanks for you reply, Mr. Rao.

Ok, I'll try it with this examples you posted

just a moment...

nageswaragunupudi wrote:
Using builh.bat is possible to create a script and set the order for our files to be compiled.

Even if shuffle the order also the regex functions are linked correctly by buildh.bat

Please do not directly check for oRs:cResyncSQL.

Please check for the two small programs I posted in this thread before. These two programs are totally independent of FWH libs.
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: HBMK2 Problem linking

Postby ricbarraes » Mon Jun 15, 2020 9:31 pm

Mr. Rao,

I tried to run your samples (but with my new query, instead) and it returned an error. it's not the same problem, but the query is also returning with a wrong structure.

this is the sample I ran (I resumed the query a little bit):
Code: Select all  Expand view

#include "fivewin.ch"

function Main()

   local oCn, oRs
   local cSql, nAt := 0

   cSql  := "SELECT * FROM states AS st LEFT JOIN teste AS tes ON st.ctest=tes.ctest WHERE tes.data >= '2019-06-16' AND tes.calmox='01' AND tes.situacao <> 'I' ORDER BY tes.data DESC LIMIT 5"
   HB_AtX( " ORDER BY | HAVING | LIMIT | GROUP ", cSql, .f., @nAt )
   ? nAt, cSql, SubStr( cSql, nAt )

 
return nil



this is the .hbp file processed by hbmk2:
Code: Select all  Expand view

#PRGs
#at the beginning of the hbp file put your prgs
C:\FWH19\SAMPLES\TESTAB.PRG

#Nome do arquivo gerado
-oc:\fwh19\samples\testab

-n
-m
-es1
-gc1
-w1
-mt
-info
-trace

#Incremental
#-inc

-cflag=-c -O2
-gui

#Includes
-ic:\FWH19\include

#Lib's
-Lc:\FWH19\lib
-lFiveH
-lFiveHC
-lLibMySql

-lhbwin
-lgtgui
-lhbct
-lxhb
-lhbmisc
-lhbziparc
-lhbmzip
-lminizip
-lhbtip


And this is the return:

"SELECT * FROM states AS st LEFT JOIN teste AS tes ON st.ctest=tes.ctest WHERE tes.data >= '2019-06-16' AND tes.calmox='01' AND tes.situacao <> 'I' ORDER BY tes.data DESC LIMIT 5 ORDER BY tes.data DESC LIMIT 5"
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: HBMK2 Problem linking

Postby nageswaragunupudi » Tue Jun 16, 2020 12:36 am

That means the correct function HB_AtX is not linked.
Instead of getting unresolved external, how a dummy function is linked returning 0 (zero) ?
surprising.
Regards

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

Re: HBMK2 Problem linking

Postby ricbarraes » Tue Jun 16, 2020 1:24 am

nageswaragunupudi wrote:That means the correct function HB_AtX is not linked.
Instead of getting unresolved external, how a dummy function is linked returning 0 (zero) ?
surprising.


yes, I found it very weird and I decided to try again. but this time I copied all my files to a new path, and ran again the sample...

and it worked! :lol:

Probably I was doing something wrong but now the sample is running fine!

it returned the same query:

"SELECT * FROM states AS st LEFT JOIN teste AS tes ON st.ctest=tes.ctest WHERE tes.data >= '2019-06-16' AND tes.calmox='01' AND tes.situacao <> 'I' ORDER BY tes.data DESC LIMIT 5"


but I'm still having trouble with my code that requires more lib's from fwh and harbour... :(

maybe the parameter that Antonio mentioned could be a solution, but I can't get the right way to populate the .txt file...
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Natter and 58 guests