Página 1 de 1

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 12:29
por ANDRIL
Pessoal em qual lib esta esta função no Harbour 3.0.0?
Usava esta função no xharbour, agora preciso no Harbour.

No xharbour com BCC linkava assim:
#BCC
VERSION=BCB.01
!ifndef CC_DIR
CC_DIR = $(MAKE_DIR)
!endif

!ifndef HB_DIR
HB_DIR = $(HARBOUR_DIR)
!endif

RECURSE= NO

SHELL =
COMPRESS = NO
EXTERNALLIB = YES
XFWH = NO
FILESTOADD = 5
WARNINGLEVEL = 0
USERDEFINE =
USERINCLUDE =
USERLIBS =
EDITOR = edit
GUI = NO
MT = NO
SRC02 = obj
PROJECT = mysqlteste.exe $(PR)
OBJFILES = $(SRC02)\TEST2.obj $(OB)
PRGFILES = TEST2.PRG $(PS)
OBJCFILES = $(OBC)
CFILES = $(CF)
RESFILES =
RESDEPEN =
TOPMODULE = TEST2.PRG
LIBFILES = lang.lib vm.lib rtl.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib dbffpt.lib common.lib gtwin.lib codepage.lib ct.lib tip.lib pcrepos.lib hsx.lib hbsix.lib debug.lib mysql.lib hbcomm.lib libmysql.lib
EXTLIBFILES = mysql.lib hbcomm.lib
DEFFILE =
HARBOURFLAGS = -b -w0
CFLAG1 = -OS $(SHELL) $(CFLAGS) -d -c -L$(HB_DIR)\lib
CFLAG2 = -I$(HB_DIR)\include;$(CC_DIR)\include
RFLAGS =
LFLAGS = -L$(CC_DIR)\lib\obj;$(CC_DIR)\lib;$(HB_DIR)\lib -Gn -M -m -s -Tpe -x -ap
IFLAGS =
LINKER = ilink32

ALLOBJ = c0x32.obj $(OBJFILES) $(OBJCFILES)
ALLRES = $(RESDEPEN)
ALLLIB = $(USERLIBS) $(LIBFILES) import32.lib cw32.lib
.autodepend

#DEPENDS

#COMMANDS
.cpp.obj:
$(CC_DIR)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**

.c.obj:
$(CC_DIR)\BIN\bcc32 -I$(HB_DIR)\include $(CFLAG1) $(CFLAG2) -o$* $**

.prg.obj:
$(HB_DIR)\bin\harbour -D__EXPORT__ -n -go -I$(HB_DIR)\include $(HARBOURFLAGS) -o$* $**

.rc.res:
$(CC_DIR)\BIN\brcc32 $(RFLAGS) $<

#BUILD

$(PROJECT): $(CFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
$(CC_DIR)\BIN\$(LINKER) @&&!
$(LFLAGS) +
$(ALLOBJ), +
$(PROJECT),, +
$(ALLLIB), +
$(DEFFILE), +
$(ALLRES)
!
No harbour crei meu HBP assim:
-w0
-es0
-gtwvg
#-gui
-m
-omysqltestehb.exe
-inc
-lhbwin
-lhbtip
-lhbct
-lxhb
-lhbcomm
-lhbmysql

#-lhbblink lib para usar funcoes do blinker

#-prgflag=-b ativa o debug

#hbhpdf.hbc
#hbzebra.hbc

test2hb.prg
Meu Harbour:
Harbour Build Info
---------------------------
Version: Harbour 3.0.0 (Rev. 16951)
Compiler: MinGW GNU C 4.5.2 (32-bit)
Platform: Windows Vista 6.0.6002 Service Pack 2
PCode version: 0.3
ChangeLog last entry: 2011-07-17 19:15 UTC+0200 Viktor Szakats (harbour.01 syenar.h
ChangeLog ID: ChangeLog 16951 2011-07-17 17:16:33Z vszakats
Built on: Jul 17 2011 20:06:49
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
---------------------------
Ate+

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 12:44
por Itamar M. Lins Jr.
Ola!
Veja se esse link ajuda.
https://pctoledo.org/forum/viewto ... 42&t=15248

Saudações,
Itamar M. Lins Jr.

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 12:48
por Itamar M. Lins Jr.
Built on: Jul 17 2011 20:06:49
https://sourceforge.net/projects/harbou ... e/download

Veja se usando o Harbour 3.2 com a Hwgui 2.19 vai melhorar as coisas por ai.
Porque vc não usou a Hwgui 2.17, então acredito que não vai ter traumas com a Hwgui 2.19.

Saudações,
Itamar M. Lins Jr.

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 13:00
por Itamar M. Lins Jr.
Outra coisa:
De lá pra cá houve modificações nela no Harbour 3.2 e 3.4

Código: Selecionar todos

2014-09-14 20:48 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * contrib/hbmysql/tmysql.prg
    * added support for nFlags in TMySQLServer constructor as
      suggested by Fernando Athayde
...
  * contrib/hbmysql/mysql.ch
    ! added missing self-guards
      This was a requirement, but now it really must
      be done, if a header wants to be put in headers=
      directive in a .hbc file for auto-inclusion.

  * contrib/hbmysql/tests/dbf2mysq.prg
    ! missing #require directive

Saudações,
Itamar M. Lins Jr.

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 13:05
por ANDRIL
Itamar, agradeço sua informações, ja baixei o 3.2 so veio as libs do MingW nesta versão, é isso mesmo?

Precisa de um .hbp que use as declarações para uso desta lib. Se alguém puder disponibilizar, fico grato. Pois tudo que tentei da erro na linkagem.

Ate+

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 13:51
por Itamar M. Lins Jr.
veio as libs do MingW nesta versão, é isso mesmo?
Vem tudo inclusive o MingW.
Precisa de um .hbp que use as declarações para uso desta lib. Se alguém puder disponibilizar, fico grato. Pois tudo que tentei da erro na linkagem.
Basta apenas vc colocar hbmk2 test2hb.prg -hbmysql.hbc só isso no seu projeto. Ou acrescentar no hbp hbmysql.hbc
-w0
-es0
-gtwvg
#-gui
-m
-omysqltestehb.exe
-inc

hbwin.hbc
hbtip.hbc
hbct.hbc
xhb.hbc
hbcomm.hbc
hbmysql.hbc

#-lhbblink lib para usar funcoes do blinker

#-prgflag=-b ativa o debug

#hbhpdf.hbc
#hbzebra.hbc

test2hb.prg
Ou criar um arquivo de nome hbmk.hbm e colocar todos os arquivos ".hbc" lá dentro.
O hbmk2 procura esse arquivo por padrão.

Saudações,
Itamar M. Lins Jr.

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 20:25
por ANDRIL
Itamar, muito obrigado pelas dicas, deu certo usando Harbour 3.2.0 colocando no .hbp
hbwin.hbc
hbtip.hbc
hbct.hbc
xhb.hbc
hbcomm.hbc
hbmysql.hbc
Agora gostaria que me explicasse por que colocando as libs não funciona, pois tentei no 3.2.0 e também não foi.
-lhbwin
-lhbtip
-lhbct
-lxhb
-lhbcomm
-lhbmysql
Ate+

Harbour 3.0.0 e uso de TMySQLServer()?

Enviado: 21 Fev 2015 21:30
por Itamar M. Lins Jr.
Agora gostaria que me explicasse por que colocando as libs não funciona,
Ola!
Porque essa era a maneira antiga de trabalhar.
O arquivo ".hbc" tem as diretivas de como compilar e possíveis dependências e onde encontrar a LIB.

Por exemplo a hbssl.hbc na pasta contrib\hbssl

Código: Selecionar todos

description=OpenSSL wrapper (encryption)

# NOTE: use HB_STATIC_OPENSSL=yes envvar to link openssl lib statically

incpaths=.

headers=${hb_name}.ch

skip={dos}

{!HB_DYNBIND_OPENSSL&!(HB_STATIC_OPENSSL&!hbdyn)}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)}libs=${_HB_DYNPREF}${hb_name}s${_HB_DYNSUFF}

{!HB_DYNBIND_OPENSSL&unix}libs=ssl crypto
{!HB_DYNBIND_OPENSSL&os2}libs=libssl_s libcrypto_s
{!HB_DYNBIND_OPENSSL&!(HB_STATIC_OPENSSL&!hbdyn)&win}libs=ssleay32 libeay32
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)&win&!allmingw}libs=ssleay32 libeay32
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)&allmingw}libs=ssl crypto
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)&allwin}libs=crypt32
* utils/hbmk2/hbmk2.prg
! fixed false .hbc hintings
! changed .hbc hinting to work with any .hbc file found in all
search paths (not just contribs) that have a matching raw library
name (this may turn out to be too broad, but using .hbc files is
always a good idea - and limiting it to contrib is technically
too complex to implement)
This also fixes detection of matching .hbc files in contrib dir.
Fixes https://github.com/vszakats/harbour-core/issues/70
Please test.
...
2014-09-27 14:56 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* utils/hbmk2/hbmk2.prg
! give the .hbc file hint only for contribs (and not addons)
(the convention that .hbc name is the same as the main libname
is only enforced for contribs - addons may use any naming)

2014-09-27 11:33 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* utils/hbmk2/hbmk2.prg
+ hbmk2 will now make a hint to use .hbc file in case there is
a link error and a raw library specified with -l option does have
a matching .hbc file in contrib/addons locations.
[TRANSLATION]
Saudações,
Itamar M. Lins Jr.