LIBhmg-64.a / LibLibPq-64.a
Moderator: Rathinagiri
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: LIBhmg-64.a / LibLibPq-64.a
Download and copy folder c:\hmg.3.4.4\LIB-64
rename liblibpq-64.rar to liblibpq-64.a*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: LIBhmg-64.a / LibLibPq-64.a
THX for Upload.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
sorry to ask again but what about hbpgsql-64
---
i test with this Code and 1st i try 32 Bit with
Code: Select all
libs=LibPq
than i change to
Code: Select all
libs=LibPq-64
i got Error about PQ* Function and Hint
i guess i need a 64 Bit Version hbpgsql-64hbmk2: Hint: Install package hbpgsql and add option 'hbpgsql.hbc' for missing function(s)
i have 32 Bit Version
but under c:\hmg.3.4.4\HARBOUR-64\ or c:\hmg.3.4.4\MinGW-64\ i did not find libhbpgsql-64.ac:\hmg.3.4.4\HARBOUR\lib\win\mingw\libhbpgsql.a
---
MakeLib.bat seem to create hbpgsql from PostgreSQL 32 Bit LibPG.LIB
who can modify MakeLib.bat for Ming64 to create hbpgsql.64 from 64 Bit LIB
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: LIBhmg-64.a / LibLibPq-64.a
hi,
as libhbpgsql.a seems to be a harbour Core LIB i guess i have to as there
can someone please point me where to go to ask for Import Lib libhbpgsql-64.a
as libhbpgsql.a seems to be a harbour Core LIB i guess i have to as there
can someone please point me where to go to ask for Import Lib libhbpgsql-64.a
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: LIBhmg-64.a / LibLibPq-64.a
sorry me again ...
did someone use LibPQ.DLL 64 Bit Version
to test LibPQ.DLL look here
viewtopic.php?f=12&t=6093
replace
with
thx to Pcmodula
did someone use LibPQ.DLL 64 Bit Version
to test LibPQ.DLL look here
viewtopic.php?f=12&t=6093
replace
Code: Select all
PeekWord()
Code: Select all
Bin2L()
have fun
Jimmy
Jimmy
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: LIBhmg-64.a / LibLibPq-64.a
Libpq.lib and libpq.dll are the libs that are in the 64 bit postgresql installation
the library was converted with the Lib to a recommended by friend Claudio Soto in viewtopic.php?t=4641C:\Program Files\PostgreSQL\11\lib
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: LIBhmg-64.a / LibLibPq-64.a
hi,
THX so i can make next try
*.DEF file look good so i copy liblibpq.a into c:\hmg.3.4.4\LIB-64\Liblibpq-64.a
start F5 and got
so i try to convert "my" 64 Bit libpq.dll libpq.lib and it work but i got same Result
before run i found some file in \Convert and they include "32" in Name and i check DLL and it was 32 Bit ... hm
is it possible that Converter work for 32 Bit only
as other have download it too please write if it work in your Environment under 64 Bit, thx
THX so i can make next try
*.DEF file look good so i copy liblibpq.a into c:\hmg.3.4.4\LIB-64\Liblibpq-64.a
start F5 and got
Code: Select all
Harbour 3.2.0dev (r1604201603)
Copyright (c) 1999-2016, http://harbour-project.org/
C:/hmg.3.4.4/mingw-64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/hmg.3.4.4/lib-64\liblibpq-64.a when searching for -llibpq-64
C:/hmg.3.4.4/mingw-64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/hmg.3.4.4/LIB-64\liblibpq-64.a when searching for -llibpq-64
C:/hmg.3.4.4/mingw-64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llibpq-64
collect2.exe: error: ld returned 1 exit status
hbmk2[PGTEST]: Error: Running linker. 1
before run i found some file in \Convert and they include "32" in Name and i check DLL and it was 32 Bit ... hm
is it possible that Converter work for 32 Bit only
as other have download it too please write if it work in your Environment under 64 Bit, thx
have fun
Jimmy
Jimmy
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: LIBhmg-64.a / LibLibPq-64.a
I try to use the 64bit libpq.dll that is included in postgres 64
Code: Select all
#include 'hmg.ch'
REQUEST HB_GT_WIN_DEFAULT
Function Main()
LOCAL conn, res, aTemp, x, y, pFile
LOCAL cHost := "localhost"
LOCAL cPort := "5432"
LOCAL cDb := "mdidemo"
LOCAL cUser := "postgres"
LOCAL cPass := "postgres"
local cPQconnectdb :=""
SetMode(25,80)
CLS
conn:= CallDll32( "PQsetdbLogin( cHost, cPort, NIL, NIL, cDb, cUser, cPass )" , "libpq.dll")
*conn := PQsetdbLogin( cHost, cPort, NIL, NIL, cDb, cUser, cPass )
? CallDll32( "PQdb( conn ), PQuser( conn ), PQpass( conn ), PQhost( conn ), PQport( conn ), PQtty( conn ), PQoptions( conn )" , "libpq.dll")
cPQconnectdb := "host =" + cHost + "port =" + cPort + "dbname =" + cDb + "user =" + cUser + "password =" + cPass
* conn := PQconnectdb( "dbname = " + cDb + " host = localhost user = " + cUser + " password = " + cPass + " port = 5432" )
conn := CallDll32( "PQconnectdb(cPQconnectdb)" , "libpq.dll")
? CallDll32( "PQstatus( conn ), PQerrorMessage( conn )" , "libpq.dll")
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: LIBhmg-64.a / LibLibPq-64.a
hi,
your Sample show me the Way to use CallDll32() so i hope it is like Xbase++
Question : how ist the full Syntax of CallDll32()
---
i have test your Code under 32 / 64 Bit (different PG DLL) but i got NIL
your Code look like my Xbase++ Code so i wonder why i can't get it run under harbour ...
both Apps are in same Folder so they use same LibPq.DLL
never less it is my work to find out what is different with calling DLL ...
---
but back to other Way and LibLibPQ-64.a
i still don't know why i can't get it work. LIB2A seems for 32 Bit while "skipping incompatible"
but i got a Step for 64 Bit
"PostgreSQL RDBMS low level (client api) interface code."
i got 64 Bit Object postgres.o and rddcopy.o
now i have to find you how to build a 64 Bit Lib.a include CLASS TPQServer (tpostgre.prg)
Thank you for your patience and helpdanielmaximiliano wrote: ↑Sat Sep 07, 2019 3:50 pm I try to use the 64bit libpq.dll that is included in postgres 64
your Sample show me the Way to use CallDll32() so i hope it is like Xbase++
Question : how ist the full Syntax of CallDll32()
---
i have test your Code under 32 / 64 Bit (different PG DLL) but i got NIL
Code: Select all
conn:= CallDll32( "PQsetdbLogin( cHost, cPort, NIL, NIL, cDb, cUser, cPass )" , "libpq.dll")
Code: Select all
METHOD PGSql:setdbLogin(cHost,cPort,cOpts,cTty, cDbName,cUser,cPwd)
local lOk
::connID := PQsetdbLogin(cHost,cPort,cOpts,cTty, cDbName,cUser,cPwd)
if !( lOk := (PQstatus(::connID) == 0) )
::connID := 0
endif
return lOk
DLLFUNCTION PQsetdbLogin(c1,c2,c3,c4,c5,c6,c7) USING STDCALL FROM libpq.dll
DLLFUNCTION PQstatus(o) USING STDCALL FROM libpq.dll
never less it is my work to find out what is different with calling DLL ...
---
but back to other Way and LibLibPQ-64.a
i still don't know why i can't get it work. LIB2A seems for 32 Bit while "skipping incompatible"
C:/hmg.3.4.4/mingw-64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:/hmg.3.4.4/lib-64\liblibpq-64.a when searching for -llibpq-64
but i got a Step for 64 Bit
"PostgreSQL RDBMS low level (client api) interface code."
Code: Select all
SET HMGPATH=%~dp0%
SET HMGPATH1=%HMGPATH:~0,-13%
SET PATH=C:\hmg.3.4.4\HARBOUR-64\bin;C:\hmg.3.4.4\MinGW-64\bin;%PATH%
c:\hmg.3.4.4\MinGW-64\bin\gcc.exe -c postgres.c -Ic:\hmg.3.4.4\HARBOUR-64\include -Id:\PG\include\
c:\hmg.3.4.4\MinGW-64\bin\gcc.exe -c rddcopy.c -Ic:\hmg.3.4.4\HARBOUR-64\include -Id:\PG\include\
now i have to find you how to build a 64 Bit Lib.a include CLASS TPQServer (tpostgre.prg)
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: LIBhmg-64.a / LibLibPq-64.a
hi,
have try
c:\hmg.3.4.4\HARBOUR-64\contrib\hbpgsql>
File d:\ALASKA\_hrb_dev\HB3\64BIT\LIB\libpq.LIB ist Original from 64 PG-Server v9.5
i got postgres.EXE and not a LIB like using TLIB
so what to use instead of TLIB when using MING64
have try
c:\hmg.3.4.4\HARBOUR-64\contrib\hbpgsql>
Code: Select all
hbmk2.exe postgres.c rddcopy.c tpostgre.c -Id:\PG\include\ -Ld:\ALASKA\_hrb_dev\HB3\64BIT\LIB -llibpq
i got postgres.EXE and not a LIB like using TLIB
Code: Select all
%MG_BCC%\bin\tlib %MV_BUILD%\hbpgsql.lib +postgres.obj +rddcopy.obj +tpostgre.obj
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: LIBhmg-64.a / LibLibPq-64.a
GOT IT RUN
i had to download 64 Bit Version of
to get rid of "missing MSVCR120.DLL" for 64 Bit
i include TEST.PRG with
and compile/link it this Way and it run and display result
File d:\ALASKA\_hrb_dev\HB3\64BIT\LIB\libpq.LIB is Original 64 Bit of PG-Server
i had to download 64 Bit Version of
https://support.microsoft.com/de-de/hel ... le-packageUpdate für Visual C++ 2013 und Visual C++ Redistributable Package
to get rid of "missing MSVCR120.DLL" for 64 Bit
i include TEST.PRG with
Code: Select all
PROCEDURE Main()
Code: Select all
harbour.exe TEST.prg -n -w -es2 -gc0 -ic:\hmg.3.4.4\include
hbmk2.exe Test.c postgres.c rddcopy.c tpostgre.c -Id:\PG\include\ -Ld:\ALASKA\_hrb_dev\HB3\64BIT\LIB -llibpq
- Attachments
-
- hbpgsql64.ZIP
- need 64 Bit DLL
- (35.53 KiB) Downloaded 333 times
have fun
Jimmy
Jimmy