PostgresSQL from core-master\contrib\hbpgsql

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Antonio Linares » Mon Sep 09, 2019 8:45 am

> but still PQ* Error when try with*.HBC

what error do 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: PostgresSQL from core-master\contrib\hbpgsql

Postby Jimmy » Mon Sep 09, 2019 7:07 pm

hi Antonio,

thx again for help
Antonio Linares wrote:> but still PQ* Error when try with*.HBC
what error do you get ?
it say
skipping incompatible C:/hmg.3.4.4/lib-64\liblibpq-64.a when searching for -llibpq-64


and show me missing PQ* Function of LibPQ
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x16): undefined reference to `PQfinish'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x46): undefined reference to `PQclear'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x76): undefined reference to `PQfreeCancel'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x19d): undefined reference to `PQconnectdb'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2bb): undefined reference to `PQsetdbLogin'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x336): undefined reference to `PQreset'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x3a6): undefined reference to `PQprotocolVersion'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x426): undefined reference to `PQclientEncoding'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x4b7): undefined reference to `PQsetClientEncoding'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x536): undefined reference to `PQdb'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x5b6): undefined reference to `PQuser'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x636): undefined reference to `PQpass'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x6b6): undefined reference to `PQhost'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x736): undefined reference to `PQport'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x7b6): undefined reference to `PQtty'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x836): undefined reference to `PQoptions'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x8b6): undefined reference to `PQtransactionStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x936): undefined reference to `PQerrorMessage'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x9b6): undefined reference to `PQstatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xa47): undefined reference to `PQexec'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xba0): undefined reference to `PQexecParams'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xc67): undefined reference to `PQresultStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xc84): undefined reference to `PQnfields'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xcf7): undefined reference to `PQresultStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xd14): undefined reference to `PQntuples'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xd96): undefined reference to `PQresultStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xddd): undefined reference to `PQgetisnull'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xdf1): undefined reference to `PQgetvalue'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xe7e): undefined reference to `PQresultStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xec8): undefined reference to `PQgetlength'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xf45): undefined reference to `PQresultStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xf6b): undefined reference to `PQnfields'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xf98): undefined reference to `PQfmod'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0xfa6): undefined reference to `PQftype'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x11b2): undefined reference to `PQfname'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x121a): undefined reference to `PQftable'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x123b): undefined reference to `PQftablecol'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x14e2): undefined reference to `PQresultStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1505): undefined reference to `PQntuples'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1513): undefined reference to `PQnfields'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x157d): undefined reference to `PQgetvalue'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1616): undefined reference to `PQresultErrorMessage'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1696): undefined reference to `PQresultStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1716): undefined reference to `PQcmdStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1796): undefined reference to `PQcmdTuples'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1831): undefined reference to `PQescapeString'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x189f): undefined reference to `PQescapeBytea'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x18b9): undefined reference to `PQfreemem'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1935): undefined reference to `PQunescapeBytea'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x194f): undefined reference to `PQfreemem'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x19c6): undefined reference to `PQoidValue'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1a46): undefined reference to `PQoidStatus'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1ac6): undefined reference to `PQbinaryTuples'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1b58): undefined reference to `PQftable'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1be8): undefined reference to `PQftype'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1c78): undefined reference to `PQfname'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1d08): undefined reference to `PQfmod'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1d98): undefined reference to `PQfsize'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1e3c): undefined reference to `PQgetisnull'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1ec7): undefined reference to `PQfnumber'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1f46): undefined reference to `PQntuples'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x1fc6): undefined reference to `PQnfields'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2057): undefined reference to `PQsendQuery'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x20d7): undefined reference to `PQgetResult'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2186): undefined reference to `PQconsumeInput'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2206): undefined reference to `PQisBusy'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2286): undefined reference to `PQrequestCancel'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2306): undefined reference to `PQflush'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2397): undefined reference to `PQsetnonblocking'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2416): undefined reference to `PQisnonblocking'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x24c6): undefined reference to `PQuntrace'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2547): undefined reference to `PQsetErrorVerbosity'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x25d7): undefined reference to `lo_import'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x267a): undefined reference to `lo_export'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2707): undefined reference to `lo_unlink'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2786): undefined reference to `PQserverVersion'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2807): undefined reference to `PQgetCancel'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x28d0): undefined reference to `PQcancel'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x29b7): undefined reference to `PQescapeByteaConn'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x29d1): undefined reference to `PQfreemem'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2a8c): undefined reference to `PQprepare'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2bda): undefined reference to `PQexecPrepared'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2caa): undefined reference to `PQputCopyData'
C:/hmg.3.4.4/harbour/lib/win/mingw\libhbpgsql.a(postgres.o):postgres.c:(.text+0x2d2c): undefined reference to `PQputCopyEnd'
so i still have a Problem to build a 64 Bit LibLibPQ.a

---

i can create a 64 Bit EXE this Way
Code: Select all  Expand view  RUN
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 -gc0 -iC:\hmg.3.4.4\include -ic:\hmg.3.4.4\HARBOUR-64\include

rem this is from 64 Bit PostgreSQL LIBPQ.LIB
hbmk2.exe DBF2PG2.c PGRDD.c rddcopy.c  postgres.c -Id:\PG\include\ -Ld:\ALASKA\_hrb_dev\HB3\64BIT\LIB -llibpq
 
this Way i link 64 Bit LibPQ.LIB of PostgreSQL and it work. :D

so files are ok and it must be a Way to create 64 Bit Lib with same files. or :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Antonio Linares » Tue Sep 10, 2019 9:14 am

You have to create an "import" library from libpq.dll:

dlltool -z somedll.def --export-all-symbol somedll.dll

dlltool -d somedll.def -l libsomedll.a

http://www.mingw.org/wiki/CreateImportLibraries
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: PostgresSQL from core-master\contrib\hbpgsql

Postby Jimmy » Wed Sep 11, 2019 3:49 am

hi Antonio,

Antonio Linares wrote:You have to create an "import" library from libpq.dll:

Code: Select all  Expand view  RUN
dlltool -z somedll.def --export-all-symbol somedll.dll
dlltool -d somedll.def -l libsomedll.a


http://www.mingw.org/wiki/CreateImportLibraries
AH ... "Import LIB" ...

so i try it and got
Code: Select all  Expand view  RUN

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
hm ... :(

Code: Select all  Expand view  RUN
c:\hmg.3.4.4\MinGW-64\bin\dlltool.exe -z libpq.def --export -all libpq.DLL

c:\hmg.3.4.4\MinGW-64\bin\dlltool.exe: libpq.DLL: no symbols
hm ... :x

---
so i create a libpq.def manual and include all PQ* Functionname
Code: Select all  Expand view  RUN

LIBRARY "LIBPQ.dll"
EXPORTS
PQbackendPID   
...
 
and try again
Code: Select all  Expand view  RUN

c:\hmg.3.4.4\MinGW-64\bin\dlltool -d libpq.def -l liblibpq-64.a
 
again liblibpq-64.a was build ... and fail :cry:

---

i try to link Import LIB this Way
Code: Select all  Expand view  RUN
hbmk2.exe PGTEST.PRG c:\hmg.3.4.4\LIB-64\Liblibpq-64.a

Harbour 3.2.0dev (r1604201603)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'PGTEST.PRG'...
Lines 191, Functions/Procedures 1
Generating C source output to 'R:\Temp\hbmk_eckv41.dir\PGTEST.c'... Done.
R:/Temp/hbmk_eckv41.dir/PGTEST.o:PGTEST.c:(.data+0x90): undefined reference to `HB_FUN_PQSETDBLOGIN'
...
and get again PQ* Error :evil:

only when link original PostgreSQL LibPQ.LIB it work ...

i get crasy with 64 Bit ... all those Stuff work with 32 Bit
i'm out of Idea what is going on ... who have a new Idea :idea:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Antonio Linares » Wed Sep 11, 2019 4:12 am

Using Microsoft dumpbin utility:

dumpbin /EXPORTS libpq.dll
Code: Select all  Expand view  RUN
Dump of file libpq.dll

File Type: DLL

  Section contains the following exports for LIBPQ.dll

    00000000 characteristics
    FFFFFFFF time date stamp
        0.00 version
           1 ordinal base
         172 number of functions
         172 number of names

    ordinal hint RVA      name

         17    0 00009380 PQbackendPID
         36    1 0000F230 PQbinaryTuples
        122    2 00008FE0 PQcancel
         48    3 0000FC10 PQclear
         72    4 00009420 PQclientEncoding
         42    5 0000F6B0 PQcmdStatus
         44    6 0000F7E0 PQcmdTuples
          3    7 00008880 PQconndefaults
         79    8 00007220 PQconnectPoll
         80    9 00007100 PQconnectStart
        157    A 00007170 PQconnectStartParams
          1    B 000085A0 PQconnectdb
        156    C 000085E0 PQconnectdbParams
        140    D 000093A0 PQconnectionNeedsPassword
        138    E 00009400 PQconnectionUsedPassword
        165    F 00008AF0 PQconninfo
         78   10 00008CA0 PQconninfoFree
        152   11 000089E0 PQconninfoParse
         26   12 0000E730 PQconsumeInput
        142   13 0000FEB0 PQcopyResult
          7   14 000090E0 PQdb
        134   15 0000FBA0 PQdescribePortal
        133   16 0000FB50 PQdescribePrepared
         51   17 00016150 PQdisplayTuples
        112   18 00013DC0 PQdsplen
        128   19 000060C0 PQencryptPassword
        172   1A 00006140 PQencryptPasswordConn
         31   1B 0000EF00 PQendcopy
         73   1C 00013DE0 PQenv2encoding
         15   1D 00009330 PQerrorMessage
         89   1E 00010780 PQescapeBytea
        127   1F 00010480 PQescapeByteaConn
        155   20 00010470 PQescapeIdentifier
        154   21 00010460 PQescapeLiteral
         88   22 00010680 PQescapeString
        126   23 00010400 PQescapeStringConn
         21   24 0000DA50 PQexec
        101   25 0000DC00 PQexecParams
        110   26 0000DD60 PQexecPrepared
        109   27 0000F530 PQfformat
          4   28 00008850 PQfinish
        151   29 0001D810 PQfireResultCreateEvents
         81   2A 0000EFB0 PQflush
         41   2B 0000F650 PQfmod
         32   2C 0000EFC0 PQfn
         37   2D 0000F250 PQfname
         38   2E 0000F2B0 PQfnumber
        121   2F 00008FC0 PQfreeCancel
         87   30 00011420 PQfreeNotify
         95   31 0000FD20 PQfreemem
         40   32 0000F5F0 PQfsize
        107   33 0000F470 PQftable
        108   34 0000F4D0 PQftablecol
         39   35 0000F590 PQftype
        120   36 00008EF0 PQgetCancel
        105   37 0000EB30 PQgetCopyData
         24   38 0000E430 PQgetResult
         47   39 0000FA70 PQgetisnull
         46   3A 0000F9F0 PQgetlength
         27   3B 0000EBB0 PQgetline
         29   3C 0000ED70 PQgetlineAsync
        114   3D 0001B840 PQgetssl
         45   3E 0000F970 PQgetvalue
         10   3F 00009170 PQhost
        153   40 0001D080 PQinitOpenSSL
        124   41 0001D060 PQinitSSL
        147   42 0001D6F0 PQinstanceData
         25   43 0000E6D0 PQisBusy
         82   44 0000EF90 PQisnonblocking
        129   45 0000EFA0 PQisthreadsafe
        160   46 00013D90 PQlibVersion
         49   47 0000FD30 PQmakeEmptyPGresult
         64   48 00013DA0 PQmblen
         35   49 0000F210 PQnfields
         22   4A 0000E780 PQnotifies
        131   4B 0000FAE0 PQnparams
         34   4C 0000F1F0 PQntuples
         43   4D 0000F6D0 PQoidStatus
         71   4E 0000F770 PQoidValue
         13   4F 00009220 PQoptions
         97   50 00009290 PQparameterStatus
        132   51 0000FB00 PQparamtype
          9   52 00009120 PQpass
        158   53 000096E0 PQping
        159   54 00009730 PQpingParams
         11   55 000091C0 PQport
        118   56 0000DCF0 PQprepare
         50   57 000156F0 PQprint
         52   58 000164D0 PQprintTuples
         98   59 000092F0 PQprotocolVersion
        103   5A 0000E7F0 PQputCopyData
        104   5B 0000E970 PQputCopyEnd
         28   5C 0000EBF0 PQputline
         30   5D 0000EDA0 PQputnbytes
        146   5E 0001D4E0 PQregisterEventProc
        125   5F 000096B0 PQregisterThreadLock
          6   60 00009030 PQrequestCancel
         66   61 0000F0D0 PQresStatus
          5   62 00008E10 PQreset
         83   63 00008D30 PQresetPoll
         84   64 00008D00 PQresetStart
        145   65 00010240 PQresultAlloc
        106   66 0000F1C0 PQresultErrorField
         65   67 0000F100 PQresultErrorMessage
        149   68 0001D7B0 PQresultInstanceData
        150   69 0001D750 PQresultSetInstanceData
         33   6A 0000F0B0 PQresultStatus
        171   6B 0000F120 PQresultVerboseErrorMessage
        136   6C 0000FC00 PQsendDescribePortal
        135   6D 0000FBF0 PQsendDescribePrepared
        119   6E 0000E0B0 PQsendPrepare
         23   6F 0000DE40 PQsendQuery
        102   70 0000DFE0 PQsendQueryParams
        111   71 0000E330 PQsendQueryPrepared
        113   72 00009310 PQserverVersion
         85   73 00009450 PQsetClientEncoding
        170   74 000095A0 PQsetErrorContextVisibility
         99   75 00009580 PQsetErrorVerbosity
        148   76 0001D690 PQsetInstanceData
         20   77 00009680 PQsetNoticeProcessor
        100   78 00009650 PQsetNoticeReceiver
        143   79 00010150 PQsetResultAttrs
        161   7A 0000E3F0 PQsetSingleRowMode
          2   7B 00008620 PQsetdbLogin
         86   7C 0000EF30 PQsetnonblocking
        144   7D 00010250 PQsetvalue
         16   7E 00009350 PQsocket
        169   7F 0001B6A0 PQsslAttribute
        168   80 0001B830 PQsslAttributeNames
        166   81 0001D040 PQsslInUse
        167   82 0001B660 PQsslStruct
         14   83 00009240 PQstatus
         18   84 000095C0 PQtrace
         96   85 00009260 PQtransactionStatus
         12   86 00009200 PQtty
         94   87 000104C0 PQunescapeBytea
         19   88 00009610 PQuntrace
          8   89 00009100 PQuser
         74   8A 0001DDE0 appendBinaryPQExpBuffer
         91   8B 0001DBE0 appendPQExpBuffer
         68   8C 0001DD90 appendPQExpBufferChar
         75   8D 0001DD20 appendPQExpBufferStr
         77   8E 0001D8B0 createPQExpBuffer
         76   8F 0001D970 destroyPQExpBuffer
        130   90 0001DA80 enlargePQExpBuffer
         69   91 0001D920 initPQExpBuffer
         54   92 000126A0 lo_close
         58   93 00012C00 lo_creat
        123   94 00012CB0 lo_create
         62   95 00013260 lo_export
         61   96 00013240 lo_import
        141   97 00013250 lo_import_with_oid
         57   98 00012960 lo_lseek
        162   99 00012A70 lo_lseek64
         53   9A 000125D0 lo_open
         55   9B 00012750 lo_read
         59   9C 00012D80 lo_tell
        163   9D 00012E30 lo_tell64
        137   9E 00012F40 lo_truncate
        164   9F 00013060 lo_truncate64
         60   A0 00013190 lo_unlink
         56   A1 00012850 lo_write
        115   A2 00001000 pg_char_to_encoding
         92   A3 00001150 pg_encoding_to_char
         93   A4 00001440 pg_utf_mblen
        116   A5 000011C0 pg_valid_server_encoding
        139   A6 00001180 pg_valid_server_encoding_id
         63   A7 0003AF10 pgresStatus
        117   A8 0001F170 pqsignal
         90   A9 0001DB30 printfPQExpBuffer
         70   AA 0001DA00 resetPQExpBuffer
         67   AB 0001D9C0 termPQExpBuffer

  Summary

        1000 .data
        2000 .pdata
       21000 .rdata
        1000 .reloc
        1000 .rsrc
       22000 .text


Creating a proper DEF file from it:
Code: Select all  Expand view  RUN
PQbackendPID
PQbinaryTuples
PQcancel
PQclear
PQclientEncoding
PQcmdStatus
PQcmdTuples
PQconndefaults
PQconnectPoll
PQconnectStart
PQconnectStartParams
PQconnectdb
PQconnectdbParams
PQconnectionNeedsPassword
PQconnectionUsedPassword
PQconninfo
PQconninfoFree
PQconninfoParse
PQconsumeInput
PQcopyResult
PQdb
PQdescribePortal
PQdescribePrepared
PQdisplayTuples
PQdsplen
PQencryptPassword
PQencryptPasswordConn
PQendcopy
PQenv2encoding
PQerrorMessage
PQescapeBytea
PQescapeByteaConn
PQescapeIdentifier
PQescapeLiteral
PQescapeString
PQescapeStringConn
PQexec
PQexecParams
PQexecPrepared
PQfformat
PQfinish
PQfireResultCreateEvents
PQflush
PQfmod
PQfn
PQfname
PQfnumber
PQfreeCancel
PQfreeNotify
PQfreemem
PQfsize
PQftable
PQftablecol
PQftype
PQgetCancel
PQgetCopyData
PQgetResult
PQgetisnull
PQgetlength
PQgetline
PQgetlineAsync
PQgetssl
PQgetvalue
PQhost
PQinitOpenSSL
PQinitSSL
PQinstanceData
PQisBusy
PQisnonblocking
PQisthreadsafe
PQlibVersion
PQmakeEmptyPGresult
PQmblen
PQnfields
PQnotifies
PQnparams
PQntuples
PQoidStatus
PQoidValue
PQoptions
PQparameterStatus
PQparamtype
PQpass
PQping
PQpingParams
PQport
PQprepare
PQprint
PQprintTuples
PQprotocolVersion
PQputCopyData
PQputCopyEnd
PQputline
PQputnbytes
PQregisterEventProc
PQregisterThreadLock
PQrequestCancel
PQresStatus
PQreset
PQresetPoll
PQresetStart
PQresultAlloc
PQresultErrorField
PQresultErrorMessage
PQresultInstanceData
PQresultSetInstanceData
PQresultStatus
PQresultVerboseErrorMessage
PQsendDescribePortal
PQsendDescribePrepared
PQsendPrepare
PQsendQuery
PQsendQueryParams
PQsendQueryPrepared
PQserverVersion
PQsetClientEncoding
PQsetErrorContextVisibility
PQsetErrorVerbosity
PQsetInstanceData
PQsetNoticeProcessor
PQsetNoticeReceiver
PQsetResultAttrs
PQsetSingleRowMode
PQsetdbLogin
PQsetnonblocking
PQsetvalue
PQsocket
PQsslAttribute
PQsslAttributeNames
PQsslInUse
PQsslStruct
PQstatus
PQtrace
PQtransactionStatus
PQtty
PQunescapeBytea
PQuntrace
PQuser
appendBinaryPQExpBuffer
appendPQExpBuffer
appendPQExpBufferChar
appendPQExpBufferStr
createPQExpBuffer
destroyPQExpBuffer
enlargePQExpBuffer
initPQExpBuffer
lo_close
lo_creat
lo_create
lo_export
lo_import
lo_import_with_oid
lo_lseek
lo_lseek64
lo_open
lo_read
lo_tell
lo_tell64
lo_truncate
lo_truncate64
lo_unlink
lo_write
pg_char_to_encoding
pg_encoding_to_char
pg_utf_mblen
pg_valid_server_encoding
pg_valid_server_encoding_id
pgresStatus
pqsignal
printfPQExpBuffer
resetPQExpBuffer
termPQExpBuffer
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: PostgresSQL from core-master\contrib\hbpgsql

Postby Antonio Linares » Wed Sep 11, 2019 4:20 am

Jimmy,

libpq.lib is available from c:\Program Files\PostgreSQL\11\lib\libpq.lib

Please try this one
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: PostgresSQL from core-master\contrib\hbpgsql

Postby Jimmy » Wed Sep 11, 2019 6:45 pm

hi Antonio,

THX for time and help
Antonio Linares wrote:Using Microsoft dumpbin utility:
dumpbin /EXPORTS libpq.dll
it work when use my 32 Bit LibPQ.DLL :!: ... but fail with my 64 Bit LibPQ.DLL :?:
G:\masm32\bin>dumpbin /EXPORTS libpq.DLL

G:\masm32\bin>Microsoft (R) COFF Binary File Dumper Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file libpq.DLL

File Type: DLL

Summary

B30 .data
1ECC .pdata
BE9C .rdata
598 .reloc
4F0 .rsrc
1D41B .text
that all i got :cry:
did you use 64 Bit LibPQ.DLL :?: which Version :?:

---

than i try LibPQ.LIB and got
Microsoft (R) COFF Binary File Dumper Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file libpq.LIB

File Type: LIBRARY
libpq.LIB : warning LNK4048: Invalid format file; ignored
libpq.LIB : warning LNK4048: Invalid format file; ignored
libpq.LIB : warning LNK4048: Invalid format file; ignored

Exports

ordinal name

17 PQbackendPID
36 PQbinaryTuples
...
67 termPQExpBuffer

Dump of file
LINK : fatal error LNK1181: cannot open input file ""
can i use that List an create a own *.DEF :?:

p.s. do i need a 64 Bit Version of dumpbin :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Jimmy » Mon Sep 16, 2019 9:36 pm

hi,

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

now i found a Blog about


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 / FiveWin :?: how to include it :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Antonio Linares » Tue Sep 17, 2019 8:35 am

Jimmy,

Why don't you simply use this one ?

c:\Program Files\PostgreSQL\11\lib\libpq.lib
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: PostgresSQL from core-master\contrib\hbpgsql

Postby Jimmy » Tue Sep 17, 2019 5:58 pm

hi Antonio,

Antonio Linares wrote:Why don't you simply use this one ?
c:\Program Files\PostgreSQL\11\lib\libpq.lib

i try to use it with harbour *.HBC
when it try to use it
Code: Select all  Expand view  RUN
libs=c:\Program Files\PostgreSQL\11\lib\libpq.lib
i got a Error unknown Format.

as i understand i need Lib*.a for harbour but i have no (working) LibLibPQ-64.a :(

---

i can link "C" file and LibPQ.LIB this Way
Code: Select all  Expand view  RUN
hbmk2.exe DBF2PG2.c PGRDD.c rddcopy.c postgres.c -Id:\PG\include\ -Ld:\ALASKA\_hrb_dev\HB3\64BIT\LIB -lpq
 
but i can't get it work when use harbour *.HBP / *.HBC

Question : does someone use 64 Bit PostgreSQL DLL :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Antonio Linares » Thu Sep 19, 2019 9:44 am

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: PostgresSQL from core-master\contrib\hbpgsql

Postby Jimmy » Wed Oct 02, 2019 11:24 pm

hi Antonio,

sorry for delay Answer ... was sick last days
THX for the Link to liblibpq-64.a
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Jimmy » Tue Oct 08, 2019 12:12 am

hi,

ok i try a new Start and just have order FW.
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: PostgresSQL from core-master\contrib\hbpgsql

Postby Antonio Linares » Tue Oct 08, 2019 6:49 am

thank you Jimmy
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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 75 guests