Ricardo,
If you use:
-ldflag=@libs.txt
then you can specify in libs.txt the libs and the order that you want
HBMK2 Problem linking
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- ricbarraes
- Posts: 49
- Joined: Tue Jun 30, 2015 2:26 am
- Location: Brazil
Re: HBMK2 Problem linking
Sorry to bother you, Antonio...
I found in the documentation an explanation about this tag, but it seems pretty vague to me:
do you have any example or any other documentation describing how to do it?
Ok, I'll try it with this examples you posted
just a moment...
I found in the documentation an explanation about this tag, but it seems pretty vague to me:
I already tried many ways to populate this .txt file and I'm getting linking errors every single time,ldflags= space separated list of values as in -ldflag= option
ldflags+= space separated list of values as in -ldflag+= option
do you have any example or any other documentation describing how to do it?
Thanks for you reply, Mr. Rao.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
Ok, I'll try it with this examples you posted
just a moment...
nageswaragunupudi wrote:Even if shuffle the order also the regex functions are linked correctly by buildh.batUsing builh.bat is possible to create a script and set the order for our files to be compiled.
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.
- ricbarraes
- Posts: 49
- Joined: Tue Jun 30, 2015 2:26 am
- Location: Brazil
Re: HBMK2 Problem linking
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):
this is the .hbp file processed by hbmk2:
And this is the return:
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
#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
#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
"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"
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: HBMK2 Problem linking
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.
Instead of getting unresolved external, how a dummy function is linked returning 0 (zero) ?
surprising.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- ricbarraes
- Posts: 49
- Joined: Tue Jun 30, 2015 2:26 am
- Location: Brazil
Re: HBMK2 Problem linking
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...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.
and it worked!
Probably I was doing something wrong but now the sample is running fine!
it returned the same query:
but I'm still having trouble with my code that requires more lib's from fwh and harbour..."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"
maybe the parameter that Antonio mentioned could be a solution, but I can't get the right way to populate the .txt file...