Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Compuin » Sat Jun 26, 2021 7:23 pm

Compuin wrote:
Antonio Linares wrote:Se llega a compilar ?

Comprueba si existe Libreria.obj


Si maestro


Con los archivos .PRG si compila y crea ejecutable.

Cuando anexo el archivo .C es que me arroja el error

Este ejemplo funciona perfecto con FWH 32
Last edited by Compuin on Sat Jun 26, 2021 8:33 pm, edited 1 time in total.
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file(SOLVED)

Postby Antonio Linares » Sat Jun 26, 2021 7:25 pm

Y en que carpeta está Libreria.obj ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file(SOLVED)

Postby Compuin » Sat Jun 26, 2021 7:28 pm

Antonio Linares wrote:Y en que carpeta está Libreria.obj ?



En \obj
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file(SOLVED)

Postby Compuin » Sat Jun 26, 2021 8:20 pm

Si agrego esta linea asi, es cuando me arroja el error

Code: Select all  Expand view  RUN

$(BCDIR)\bin\bcc64 -c -I$(HBDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& @tmp c\$&.c  
 


Si no agrego los includes de Harbour, no deja cargar el <hbapi> y por ende, no deja incluir el archivo escrito en .C

Tambien note que el .C no se logra comvertir a .Obj

Como logro corregir ambos?
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Antonio Linares » Sat Jun 26, 2021 10:33 pm

Has hecho lo correcto al añadir el path de los includes de Harbour

Que errores te da al compilarlo ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Compuin » Sun Jun 27, 2021 12:15 am

Antonio Linares wrote:Has hecho lo correcto al añadir el path de los includes de Harbour

Que errores te da al compilarlo ?



Code: Select all  Expand view  RUN

C:\clinica64>c:\bcc7164\bin\make -fsistema.mak
MAKE Version 5.41  Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
        c:\harbour64\bin\harbour .\prg\comienzo.prg /L /N /W /Oobj\ /Ic:\fwh64\include;c:\harbour64\include;.\include
Harbour 3.2.0dev (r1603181642)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling '.\prg\comienzo.prg'...
Lines 5118, Functions/Procedures 1
Generating C source output to 'obj\comienzo.c'... Done.
        c:\bcc7164\bin\bcc64 -c -tWM -Ic:\harbour64\include -Ic:\bcc7164\include\windows\sdk -Ic:\bcc7164\include\windows\crtl -oobj\comienzo obj\comienzo.c
Embarcadero C++ 7.20 for Win64 Copyright (c) 2012-2016 Embarcadero Technologies, Inc.
obj\comienzo.c:
Fatal: '.\obj\Libreria.obj' does not exist - don't know how to make it

C:\clinica64>


Alli le puse el error maestro

Y este es el .mak que uso

Code: Select all  Expand view  RUN

#Borland make 64 bits (c) FiveTech Software 2016

HBDIR=c:\harbour64
BCDIR=c:\bcc7164
FWDIR=c:\fwh64

#change these paths as needed
.path.obj = .\obj
.path.prg = .\prg
.path.ch  = .\Include;$(FWDIR)\include;$(HBDIR)\include
.path.c   = .\
.path.rc  = .\Resource

PRG =        \
.\comienzo.prg \

C =        \
.\Libreria.c  

OBJ=$(PRG:.prg=.obj) $(C:.c=.obj)
OBJS=$(OBJ:.\=.\obj\)  

PROJECT    : Sistema.exe

sistema.exe  : $(OBJS) sistema.res
   echo off
   echo $(BCDIR)\lib\c0w64.o + > b64.bc
   echo $(OBJS), + >> b64.bc
   echo sistema.exe, + >> b64.bc
   echo sistema.map, + >> b64.bc
   echo $(FWDIR)\lib\Five64.a $(FWDIR)\lib\FiveC64.a + >> b64.bc
   echo $(HBDIR)\lib\hbrtl.a + >> b64.bc
   echo $(HBDIR)\lib\hbvm.a + >> b64.bc
   echo $(HBDIR)\lib\gtgui.a + >> b64.bc
   echo $(HBDIR)\lib\hblang.a + >> b64.bc
   echo $(HBDIR)\lib\hbmacro.a + >> b64.bc
   echo $(HBDIR)\lib\hbrdd.a + >> b64.bc
   echo $(HBDIR)\lib\rddntx.a + >> b64.bc
   echo $(HBDIR)\lib\rddcdx.a + >> b64.bc
   echo $(HBDIR)\lib\rddfpt.a + >> b64.bc
   echo $(HBDIR)\lib\hbsix.a + >> b64.bc
   echo $(HBDIR)\lib\hbdebug.a + >> b64.bc
   echo $(HBDIR)\lib\hbcommon.a + >> b64.bc
   echo $(HBDIR)\lib\hbpp.a + >> b64.bc
   echo $(HBDIR)\lib\hbwin.a + >> b64.bc
   echo $(HBDIR)\lib\hbcpage.a + >> b64.bc
   echo $(HBDIR)\lib\hbct.a + >> b64.bc
   echo $(HBDIR)\lib\hbcplr.a + >> b64.bc
   echo $(HBDIR)\lib\hbpcre.a + >> b64.bc
   echo $(HBDIR)\lib\xhb.a + >> b64.bc
   echo $(HBDIR)\lib\hbziparc.a + >> b64.bc
   echo $(HBDIR)\lib\hbmzip.a + >> b64.bc
   echo $(HBDIR)\lib\hbzlib.a + >> b64.bc
   echo $(HBDIR)\lib\minizip.a + >> b64.bc
   echo $(HBDIR)\lib\png.a + >> b64.bc
   echo $(HBDIR)\lib\hbusrrdd.a + >> b64.bc
   echo $(HBDIR)\lib\hbtip.a + >> b64.bc

   echo $(BCDIR)\lib\cw64.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\kernel32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\user32.a + >> b64.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.a + >> b64bc
   echo $(BCDIR)\lib\import64.a, >> b64.bc

   IF EXIST .\Resource\Sistema.res echo .\Resource\Sistema.res >> b64.bc
   $(BCDIR)\bin\ilink64 -Gn -aa -Tpe -s @b64.bc
   del b64.bc
   del tmp
   del *.map
   
   if ERRORLEVEL 0 sistema.exe
   
.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include;.\include
  $(BCDIR)\bin\bcc64 -c -tWM -I$(HBDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc64 -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& @tmp $&.c
  del tmp

Sistema.res : Sistema.rc
  $(BCDIR)\bin\brc32.exe -r -D__64__ -I%bcdir%\include -I%bcdir%\include\windows\sdk .\Resource\Sistema.rc
 


Archivo comienzo.prg

Code: Select all  Expand view  RUN

#include "fivewin.ch"
#include "sistema.ch"

FUNCTION Main()

    LOCAL aDir := Directory()
   
    MiAlertaenC("Alerta escrito en C ")
   
    XBrowser aDir TITLE Version()
   
RETURN Nil
 


Archivo Libreria.c

Code: Select all  Expand view  RUN

#include "Windows.h"
#include "hbapi.h"

HB_FUNC( MIALERTAENC )
   {
    MessageBox( GetActiveWindow(),  "ESTA ES MI ALERTA" ,"Mialerta", MB_ICONINFORMATION ) ;
   }
 
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Compuin » Sun Jun 27, 2021 2:01 pm

Any advice?
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Antonio Linares » Sun Jun 27, 2021 7:55 pm

Este valor no está correcto:

.path.c = .\

es por esto que no encuentra Libreria.c y no lo compila
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Compuin » Sun Jun 27, 2021 9:46 pm

No, no termina de compilar luego de esa correccion

c:\bcc7164\bin\ilink64 -Gn -aa -Tpe -s @b64.bc
Turbo Incremental Link64 6.75 Copyright (c) 1997-2016 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'LIBRERIA.OBJ'

** error 2 ** deleting Sistema.exe

C:\clinica64>
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Antonio Linares » Mon Jun 28, 2021 10:22 am

Añade esta línea y comprueba si pasa por ahi:

.C.OBJ:
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
echo "pasa por aqui"
$(BCDIR)\bin\bcc64 -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& @tmp $&.c
del tmp
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Compuin » Mon Jun 28, 2021 12:01 pm

Maestro,

hice lo que me recomendo y me arroja esto

C:\clinica64>if not exist obj md obj

C:\clinica64>c:\bcc7164\bin\make -fsistema.mak
MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -Ic:\Harbour64\include;c:\Fwh64\include >> tmp
echo "pasa por aqui"
"pasa por aqui"
c:\Bcc7164\bin\bcc64 -Ic:\Bcc7164\include\windows\sdk -Ic:\Bcc7164\include\windows\crtl -oobj\Libreria @tmp Libreria.c
Embarcadero C++ 7.20 for Win64 Copyright (c) 2012-2016 Embarcadero Technologies, Inc.
bcc64.exe: error: no such file or directory: 'Libreria.c'
bcc64.exe: error: no input files

** error 1 ** deleting .\obj\Libreria.obj

C:\clinica64>


Y agregandolo asi, tampoco

.C.OBJ:
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
echo "pasa por aqui"
$(BCDIR)\bin\bcc64 -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& @tmp c\$&.c
del tmp


c:\Bcc7164\include\windows\sdk/oaidl.h:2146:57: note: previous definition is here
typedef /* [unique] */ __RPC_unique_pointer IDispatch *LPDISPATCH;
^
In file included from c\Libreria.c:1:
In file included from c:\Bcc7164\include\windows\sdk\Windows.h:263:
c:\Bcc7164\include\windows\sdk\commdlg.h:710:21: warning: redefinition of typedef 'CHOOSEFONT' is a C11 feature
[-Wtypedef-redefinition]
typedef CHOOSEFONTA CHOOSEFONT;
^
c:\Bcc7164\include\windows\sdk\commdlg.h:695:21: note: previous definition is here
typedef CHOOSEFONTA CHOOSEFONT;
^
In file included from c\Libreria.c:1:
In file included from c:\Bcc7164\include\windows\sdk\Windows.h:289:
c:\Bcc7164\include\windows\sdk\imm.h:46:19: warning: redefinition of typedef 'LPUINT' is a C11 feature
[-Wtypedef-redefinition]
typedef UINT FAR *LPUINT;
^
c:\Bcc7164\include\windows\sdk\mmsyscom.h:103:21: note: previous definition is here
typedef UINT FAR *LPUINT;
^
c\Libreria.c:2:10: fatal error: 'hbapi.h' file not found
#include "hbapi.h"
^
33 warnings and 1 error generated.

** error 1 ** deleting .\obj\Libreria.obj

C:\clinica64>
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Antonio Linares » Mon Jun 28, 2021 2:40 pm

Prueba asi:

$(BCDIR)\bin\bcc64 -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& @tmp .\c\$&.c

Para los warnings prueba este flag:

-std=<value>
y para C11 value es 201112L // gracias a Manu por la info
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Compuin » Mon Jun 28, 2021 2:42 pm

Antonio Linares wrote:Prueba asi:

$(BCDIR)\bin\bcc64 -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& @tmp .\c\$&.c


Sigue arrojando el error anterior
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Compuin » Mon Jun 28, 2021 3:12 pm

Maestro,

Finalmente logro compilar el archivo .C

Modifique de esta manera y logro hacerlo

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include;.\include
  $(BCDIR)\bin\bcc64 -c -I$(HBDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$&.obj obj\$&.c

.C.OBJ:
   echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
   echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
   $(BCDIR)\bin\bcc64 -c -v -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -I$(HBDIR)\include -oobj\$&.obj c\$&.c
   del tmp

Sistema.res : Sistema.rc
  $(BCDIR)\bin\brc32.exe -r -D__64__ -I%bcdir%\include -I%bcdir%\include\windows\sdk .\Resource\Sistema.rc
[/quote]

Lo unico que no me quedo claro es donde debo colocar el flag std=<201112L> para evitar los warning
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Issue with FWH64/Harbour64/BCC7164 and Mysql.h file

Postby Antonio Linares » Tue Jun 29, 2021 8:48 am

Muy bien

$(BCDIR)\bin\bcc64 -c -std=201112L ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests