FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index All products support neuer User
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
neuer User
Posted: Thu Sep 05, 2019 05:06 PM
hi,

mein Name ist Jimmy, Baujahr 1956 in Shanghai / China.

mit xBase hab ich angefangen auf einem Apple ][ und dBase ][ unter CP/M
über dBase III, Cl*pper, VO bis ich bei Xbase++ gelandet https://www.xbaseforum.de

in der letzten Zeit hab ich mich mit dem Thema 64 Bit beschäftigt und da speziell mit PostgreSQL.

---

ich habe liblibpq.a und Libhbpgsql.a die 32 Bit sind.
ich benötige die 64 Bit Versionen liblibpq-64.a / Libhbpgsql-64.a

wenn ich das richtig verstehe besteht hbpgsql aus
Code (fw): Select all Collapse
postgres.c
rddcopy.c 
tpostgre.prg
das File postgres.c ist das
PostgreSQL RDBMS low level (client api) interface code.


nun habe ich ein MakeLib.bat was aber mit BCC arbeitet also 32 Bit.
wie mache ich das mit MING64 für 64 Bit :-)

---

hm ... kein Attachment möglich :-)

Code (fw): Select all Collapse
@echo off

rem Builds Harbour library hbpgsql.lib and converts original POstgreSQL libpq.lib (COFF) to OMF format (for Borland)
set PQ_VER=9.5

:OPT
  call ..\..\batch\makelibopt.bat hbpgsql h %1 %2 %3 %4 %5 %6 %7 %8 %9
  if %MV_EXIT%==Y    goto END
  if %MV_DODONLY%==Y goto CLEANUP
  if %MV_USEXHRB%==N goto BUILD
  echo hbpgsql.lib is not compatible with xHarbour.
  goto END


:BUILD
  if exist %MV_BUILD%\hbpgsql.lib del %MV_BUILD%\hbpgsql.lib
  %MV_HRB%\bin\harbour.exe tpostgre.prg -n -w3 -es2 -gc0 -i%MV_HRB%\include
  %MG_BCC%\bin\bcc32 -c -O2 -I%MG_HRB%\include -I.\%PQ_VER% postgres.c rddcopy.c tpostgre.c
  %MG_BCC%\bin\tlib %MV_BUILD%\hbpgsql.lib +postgres.obj +rddcopy.obj +tpostgre.obj
  if exist %MV_BUILD%\hbpgsql.bak del %MV_BUILD%\hbpgsql.bak

  if exist .\%PQ_VER%\libpq.lib coffimplib .\%PQ_VER%\libpq.lib %MV_BUILD%\libpq.lib
  if not exist .\%PQ_VER%\libpq.lib echo original libpq.lib (COFF) is MISSING: %MV_BUILD%\libpq.lib (OMF) is not created!


:CLEANUP
  if exist postgres.obj del postgres.obj
  if exist rddcopy.obj  del rddcopy.obj
  if exist tpostgre.obj del tpostgre.obj
  if exist tpostgre.c   del tpostgre.c

:END
  call ..\..\batch\makelibend.bat
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: neuer User
Posted: Fri Sep 06, 2019 08:32 AM
Jimmy,

cd c:\harbour\contrib\hbpgsql\
c:\gcc81w64\bin\gcc -c postgres.c -Ic:\harbour\include -I"c:\Program Files"\PostgreSQL\11\include\
c:\gcc81w64\bin\gcc -c rddcopy.c -Ic:\harbour\include -I"c:\Program Files"\PostgreSQL\11\include\

https://bitbucket.org/fivetech/harbour-xharbour-builds/downloads/gcc81w64.zip
https://github.com/FiveTechSoft/harbour_and_xharbour_builds/blob/master/harbour3.2_gcc81_64bits.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: neuer User
Posted: Sat Sep 07, 2019 10:00 AM
hi Antonio,

thx for you Answer
Antonio Linares wrote:
Code (fw): Select all Collapse
cd c:\harbour\contrib\hbpgsql\
c:\gcc81w64\bin\gcc -c postgres.c -Ic:\harbour\include -I"c:\Program Files"\PostgreSQL\11\include\
c:\gcc81w64\bin\gcc -c rddcopy.c -Ic:\harbour\include -I"c:\Program Files"\PostgreSQL\11\include\

YES ... that what i'm searching for 64 Bit :-)

Antonio Linares wrote:
https://bitbucket.org/fivetech/harbour-xharbour-builds/downloads/gcc81w64.zip
https://github.com/FiveTechSoft/harbour_and_xharbour_builds/blob/master/harbour3.2_gcc81_64bits.zip
thx for Link

now i got
Code (fw): Select all Collapse
postgres.o 
rddcopy.o

em, äh ... how to make LibLibPQ-64.a from Object :-)
what about CLASS TPQServer in tpostgre.prg

sorry about those Question but i'm a Newbie outside Xbase++
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: neuer User
Posted: Sun Sep 08, 2019 06:06 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion