Page 4 of 5

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Sun Sep 08, 2019 7:59 am
by serge_girard
Thanks!

Serge

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Sun Sep 08, 2019 7:42 pm
by AUGE_OHR
hi,

as i now know that is working that Way i like to ask how build a LIB instead of EXE :?:
how to integrate it into HMG IDE so i need only to press F5

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Sun Sep 08, 2019 11:42 pm
by AUGE_OHR
i try to build LIB and i got some LIB.a ... but still get PQ* Error when use them :evil:

Code: Select all

c:\hmg.3.4.4\HARBOUR-64\bin\hbmk2.exe -oLibpq-64 -hblib -Id:\PG\include\ -Ld:\ALASKA\_hrb_dev\HB3\64BIT\LIB -llibpq postgres.c rddcopy.c tpostgre.c 

or

c:\hmg.3.4.4\MinGW-64\bin\ar rc .\liblibpQ-64.a postgres.o rddcopy.o tpostgre.o d:\ALASKA\_hrb_dev\HB3\64BIT\LIB\libpq.LIB
i have in *.HBC

Code: Select all

libpaths=c:\hmg.3.4.4\LIB-64
libs=Libpq-64
mt=yes
both Version create LIB.a but both with same Error
...
C:/hmg.3.4.4/lib-64\libLibpq-64.a(postgres.o):postgres.c:(.text+0x2857): undefined reference to `PQuntrace'
collect2.exe: error: ld returned 1 exit status
hbmk2[DBF2PG3]: Error: Running linker. 1

gcc.exe R:/Temp/hbmk_0h8zda.dir/DBF2PG2.o R:/Temp/hbmk_0h8zda.dir/PGRDD.o R:/Temp/hbmk_0h8zda.dir/hbmk_h7aqw3.o D:/ALASKA/_hrb_dev/HB3/DBF2PG/64/_temp.o -pthread -static-libgcc -static-libstdc++ -static -lpthread -mwindows -Wl,--start-group -l"hmg-64" -l"crypt-64" -l"edit-64" -l"editex-64" -l"graph-64" -l"ini-64" -l"report-64" -l"hfcl-64" -lmsvfw32 -lvfw32 -l"hbvpdf-64" -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -l"Libpq-64" -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -oDBF2PG3.exe -L"C:/hmg.3.4.4/harbour-64/lib/win/mingw64" -L"C:/hmg.3.4.4/lib-64" -L"c:/hmg.3.4.4/LIB-64"
so what are missing as it work when link files direct to EXE :?:

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Mon Sep 09, 2019 3:55 am
by AUGE_OHR
hi,

i'm a harbour Newbiew so forgive my Question

i have compile 3 PRG where 1nd PRG contain CLASS TPQserver this Way

Code: Select all

harbour.exe tpostgre.prg -n -m -w -es2 -gc0 -ic:\hmg.3.4.4\INCLUDE -ic:\hmg.3.4.4\HARBOUR-64\include
harbour.exe PGRDD.PRG    -n -m -w -es2 -gc0 -iC:\hmg.3.4.4\include -ic:\hmg.3.4.4\HARBOUR-64\include
harbour.exe DBF2PG2.PRG  -n -m -w -es2 -gc0 -iC:\hmg.3.4.4\include -ic:\hmg.3.4.4\HARBOUR-64\include
now when compile DBF2PG2.PRG, where i call TPQserver:New(), it does not compile ... missing TPQserver :?:

CLASS TPQserver is in tpostgre.prg which have "transpile" before.
so what to include in DBF2PG2.PRG to get rid of Error :?:

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Mon Sep 09, 2019 10:27 am
by Anand
AUGE_OHR wrote: Mon Sep 09, 2019 3:55 am now when compile DBF2PG2.PRG, where i call TPQserver:New(), it does not compile ... missing TPQserver :?:

CLASS TPQserver is in tpostgre.prg which have "transpile" before.
so what to include in DBF2PG2.PRG to get rid of Error :?:
Try using .hbp 'project' file and write app prgs names in it, like .xpj or Xbase++.

This will get rid of Error.

Regards,

Anand

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Mon Sep 09, 2019 6:50 pm
by AUGE_OHR
hi,

thx for Answer
Anand wrote: Mon Sep 09, 2019 10:27 am
AUGE_OHR wrote: Mon Sep 09, 2019 3:55 am now when compile DBF2PG2.PRG, where i call TPQserver:New(), it does not compile ... missing TPQserver :?:

CLASS TPQserver is in tpostgre.prg which have "transpile" before.
so what to include in DBF2PG2.PRG to get rid of Error :?:
Try using .hbp 'project' file and write app prgs names in it, like .xpj or Xbase++.
This will get rid of Error.
my Problem is that how to include LibPQ.LIB of PostgreSQL into Project *.HBP :?:

i have try different Way to create a LibLibPQ-64.a and got some *.a ... but they all fail.
skipping incompatible C:/hmg.3.4.4/lib-64\liblibpq-64.a when searching for -llibpq-64
also Hint
Hint: Install package hbpgsql and add option 'hbpgsql.hbc' for missing
does not work while it point to 32 Bit LIB

so i made all on Command line and i got working 64 Bit EXE.

---

i can work with it but it is not a Solution for all other using HMG IDE so i ask again how to build a 64 Bit Lib.a :?:

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Wed Sep 11, 2019 4:03 am
by AUGE_OHR
hi,

i got a Tip to use DLLTOOL of MING to create a "Import LIB"
http://www.mingw.org/wiki/CreateImportLibraries

Problem : i fail to create a *.DEF

Code: Select all

c:\hmg.3.4.4\MinGW-64\bin\dlltool.exe -z libpq.def --export-all-symbol libpq.DLL
c:\hmg.3.4.4\MinGW-64\bin\dlltool.exe: libpq.DLL: no symbols
:(

i have a *.DEF from LIB2A Tool so i try that

Code: Select all

c:\hmg.3.4.4\MinGW-64\bin\dlltool -d libpq.def -l liblibpq-64.a
liblibpq-64.a was create ... but after press F5 i still got PQ* Error :x

i also try this Way

Code: Select all

hbmk2.exe TEST.PRG c:\hmg.3.4.4\LIB-64\Liblibpq-64.a
but again PQ* Error :cry:

only when link 64 Bit LibPQ.LIB work ... but i can't use it this Way with HMG IDE.
does someone have a Idea :idea:

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Wed Sep 11, 2019 10:38 pm
by AUGE_OHR
hi,
danielmaximiliano wrote: Tue Sep 03, 2019 1:14 pm Download and copy folder c:\hmg.3.4.4\LIB-64
liblibpq-64.rar

rename liblibpq-64.rar to liblibpq-64.a
do every Postgre Version need "own" Import LIB :?:

i ask while DLL / LIB seem from v11.5 and LibLibPQ.a seem not to work in my Environment with Postgre v9.5.

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Mon Sep 16, 2019 9:34 pm
by AUGE_OHR
hi,

i'm still struggle with 64 Bit LibLibPQ.a ... :(

now i found a Blog about
"Building PostgreSQL client library using MinGW under WinXP SP3"
https://pgolub.wordpress.com/2008/12/15 ... winxp-sp3/
Ok it is XP (32 Bit ?) and LibPQ.DLL v8.3.5 but the Problem seem me the same with 64 Bit.
they point to a Tool called MSYS which is include in this Distribution
https://sourceforge.net/projects/mingw/files/

but again it seem me 32 Bit and i don't find MSYS in 64 Bit Version of MinGW.
can somebody tell me where i find 64 Bit Version of MSYS :?:

---

did someone use BCC v7.x 64 Bit with harbour / HMG :?: how to include it :?:

Re: LIBhmg-64.a / LibLibPq-64.a

Posted: Tue Sep 17, 2019 2:30 am
by danielmaximiliano