Compile with FW August 2024

Compile with FW August 2024

Postby Maurizio » Thu Sep 26, 2024 9:29 am

Hello Antonio,
I've been using hbmk2 for years and never had any problems .
Now with fw 24/08 and BCC77 I have errors with the compilation .
I think the problem is when I have C code in
#pragma BEGINDUMP
......
#pragma ENDDUMP
Code: Select all  Expand view
hbmk2: Processing local make script: hbmk.hbm
hbmk2: Compiling Harbour sources...
Harbour 3.2.0dev (r2407221137)
Copyright (c) 1999-2021, https://harbour.github.io/
hbmk2: Compiling...
.beta_24\win\bcc\mastrosql.c:
.beta_24\win\bcc\Fatture_XML_SQL_Attive.c:
.beta_24\win\bcc\calldll.c:
Warning W8019 C:\BCC77\Include\windows\sdk\winnt.h 24322: Code has no effect in function TpDestroyCallbackEnviron
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4874: 'Ranges' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4873: 'Index' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4872: 'Bytes' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4934: 'Min' is assigned a value that is never used in function DeviceDsmValidateInput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4933: 'Max' is assigned a value that is never used in function DeviceDsmValidateInput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 5135: 'Min' is assigned a value that is never used in function DeviceDsmValidateOutput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 5134: 'Max' is assigned a value that is never used in function DeviceDsmValidateOutput
*** 1 errors in Compile ***
.beta_24\win\bcc\funzioni.c:
Warning W8019 C:\BCC77\Include\windows\sdk\winnt.h 24322: Code has no effect in function TpDestroyCallbackEnviron
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4874: 'Ranges' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4873: 'Index' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4872: 'Bytes' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4934: 'Min' is assigned a value that is never used in function DeviceDsmValidateInput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4933: 'Max' is assigned a value that is never used in function DeviceDsmValidateInput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 5135: 'Min' is assigned a value that is never used in function DeviceDsmValidateOutput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 5134: 'Max' is assigned a value that is never used in function DeviceDsmValidateOutput
Warning W8075 ..\\my_func\\funzioni.prg 5370: Suspicious pointer conversion in function HB_FUN_GETFILEVERSIONINFO
*** 1 errors in Compile ***
.beta_24\win\bcc\ftp_aggiorna.c:
Warning W8019 C:\BCC77\Include\windows\sdk\winnt.h 24322: Code has no effect in function TpDestroyCallbackEnviron
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4874: 'Ranges' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4873: 'Index' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4872: 'Bytes' is assigned a value that is never used in function DeviceDsmAddDataSetRange
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4934: 'Min' is assigned a value that is never used in function DeviceDsmValidateInput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 4933: 'Max' is assigned a value that is never used in function DeviceDsmValidateInput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 5135: 'Min' is assigned a value that is never used in function DeviceDsmValidateOutput
Warning W8004 C:\BCC77\Include\windows\sdk\winioctl.h 5134: 'Max' is assigned a value that is never used in function DeviceDsmValidateOutput
Warning W8075 ..\\my_func\\ftp_aggiorna.PRG 644: Suspicious pointer conversion in function HB_FUN_FILETIMES
Warning W8080 ..\\my_func\\ftp_aggiorna.PRG 684: 'bRet' is declared but never used in function HB_FUN_FILETIMES
Warning W8061 ..\\my_func\\ftp_aggiorna.PRG 750: Initialization is only partially bracketed in function HB_FUN_ISADMIN
Warning W8060 ..\\my_func\\ftp_aggiorna.PRG 752: Possibly incorrect assignment in function HB_FUN_ISADMIN
Warning W8060 ..\\my_func\\ftp_aggiorna.PRG 766: Possibly incorrect assignment in function HB_FUN_ISADMIN
Warning W8060 ..\\my_func\\ftp_aggiorna.PRG 776: Possibly incorrect assignment in function HB_FUN_ISADMIN
Warning W8060 ..\\my_func\\ftp_aggiorna.PRG 784: Possibly incorrect assignment in function HB_FUN_ISADMIN
*** 1 errors in Compile ***
****************** Linking errors *


Regards Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm


Re: Compile with FW August 2024

Postby Maurizio » Thu Sep 26, 2024 10:24 am

Enrico
Code: Select all  Expand view
/*
 * Harbour Project source code:
 * CALLDLL compatibility library.
 *
 * Copyright 2010 Viktor Szakats (harbour syenar.net)
 * www - https://harbour.github.io/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this software; see the file COPYING.txt.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
 *
 * As a special exception, the Harbour Project gives permission for
 * additional uses of the text contained in its release of Harbour.
 *
 * The exception is that, if you link the Harbour libraries with other
 * files to produce an executable, this does not by itself cause the
 * resulting executable to be covered by the GNU General Public License.
 * Your use of that executable is in no way restricted on account of
 * linking the Harbour library code into it.
 *
 * This exception does not however invalidate any other reasons why
 * the executable file might be covered by the GNU General Public License.
 *
 * This exception applies only to the code released by the Harbour
 * Project under the name Harbour.  If you copy code from other
 * Harbour Project or Free Software Foundation releases into a copy of
 * Harbour, as the General Public License permits, the exception does
 * not apply to the code that you add in this way.  To avoid misleading
 * anyone as to the status of such modified files, you must delete
 * this exception notice from them.
 *
 * If you write modifications of your own for Harbour, it is your choice
 * whether to permit this exception to apply to your modifications.
 * If you do not wish that, delete this exception notice.
 *
 */


 

#include "hbdyn.ch"

STATIC s_hDLL := { => }
STATIC s_mutex := hb_mutexCreate()

PROCEDURE UnloadAllDll()

   hb_mutexLock( s_mutex )
   s_hDLL := { => }
   hb_mutexUnlock( s_mutex )
   
RETURN

//       HMG_CallDLL( cLibName, [ nRetType ] , cFuncName [, Arg1, ..., ArgN ] ) ---> xRetValue
FUNCTION HMG_CallDLL( cLibName, nRetType, cFuncName, ... )

   LOCAL nEncoding := iif( HMG_IsCurrentCodePageUnicode(), HB_DYN_ENC_UTF16, HB_DYN_ENC_ASCII )
   LOCAL pLibrary
 
   IF HB_ISSTRING( cFuncName ) .AND. HB_ISSTRING( cLibName )
      hb_mutexLock( s_mutex )


      IF !( cLibName $ s_hDLL )
         s_hDLL[ cLibName ] := hb_libLoad( cLibName )
      ENDIF

      pLibrary := s_hDLL[ cLibName ]

      hb_mutexUnlock( s_mutex )

      IF .NOT. HB_ISNUMERIC( nRetType )
         nRetType := HB_DYN_CTYPE_DEFAULT
      ENDIF

      cFuncName := AllTrim( cFuncName )

      DO CASE
      CASE HMG_IsCurrentCodePageUnicode() == .T. .AND. HMG_IsFuncDLL( pLibrary, cFuncName + "W" )
         cFuncName := cFuncName + "W"
      CASE HMG_IsCurrentCodePageUnicode() == .F. .AND. HMG_IsFuncDLL( pLibrary, cFuncName + "A" )
         cFuncName := cFuncName + "A"
      ENDCASE

      RETURN hb_DynCall( { cFuncName, pLibrary, hb_bitOr( HB_DYN_CALLCONV_STDCALL, nRetType, nEncoding, HB_DYC_OPT_NULLTERM ) }, ... )
   ENDIF

RETURN NIL

FUNCTION HMG_IsCurrentCodePageUnicode()
RETURN ( "UTF8" $ Set( _SET_CODEPAGE ) )

#pragma BEGINDUMP

#include <windows.h>
#include "hbapi.h"

//        HMG_IsFuncDLL ( pLibDLL | cLibName, cFuncName ) ---> Boolean
HB_FUNC ( HMG_ISFUNCDLL )
{
   HMODULE hModule;
   BOOL bRelease;
   char * cFuncName;

   if ( HB_ISCHAR( 1 ) )
   {  hModule = LoadLibrary( ( char * ) hb_parc( 1 ) );
      bRelease = TRUE;
   }
   else
   {  hModule = ( HMODULE ) hb_libHandle( hb_param( 1, HB_IT_ANY ) );
      bRelease = FALSE;
   }

   cFuncName = ( char * ) hb_parc( 2 );

   hb_retl( GetProcAddress( hModule, cFuncName ) ? TRUE : FALSE );

   if( bRelease && hModule )
      FreeLibrary( hModule );
}

#pragma ENDDUMP

 
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Compile with FW August 2024

Postby Enrico Maria Giordano » Thu Sep 26, 2024 10:48 am

This is not a C module, is a PRG module.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile with FW August 2024

Postby Antonio Linares » Thu Sep 26, 2024 10:52 am

Dear Maurizio,

You may add these lines at the top in each of those C files:

#pragma warn -8019
#pragma warn -8004
#pragma warn -8075
#pragma warn -8080
#pragma warn -8061
#pragma warn -8060
regards, saludos

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

Re: Compile with FW August 2024

Postby Enrico Maria Giordano » Thu Sep 26, 2024 10:55 am

Antonio,

Remember that they are PRG modules. Anyway, I tried to rename it calldll.prg and compile it with MSC32, MSC64, BCC32 and BCC64: no warnings.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile with FW August 2024

Postby Antonio Linares » Thu Sep 26, 2024 10:57 am

I see, then after

#pragma BEGINDUMP
regards, saludos

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

Re: Compile with FW August 2024

Postby Maurizio » Thu Sep 26, 2024 2:40 pm

Thanks Antonio
I Put
#pragma BEGINDUMP

#pragma warn -8019
#pragma warn -8004
#pragma warn -8075
#pragma warn -8080
#pragma warn -8061
#pragma warn -8060


and we took a step forward .
Now I have this error
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'SSLEAY32.LIB'
hbmk2: Error: Running linker. 2
ilink32.exe @C:\Users\Maurizio\AppData\Local\Temp\rm5uz1.lnk




Regards Maurizio
Last edited by Maurizio on Thu Sep 26, 2024 2:52 pm, edited 1 time in total.
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Compile with FW August 2024

Postby Enrico Maria Giordano » Thu Sep 26, 2024 2:48 pm

It is an old OpenSSL lib. Now you have to use these:

Code: Select all  Expand view
libssl.lib
libcrypto.lib
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile with FW August 2024

Postby Maurizio » Fri Sep 27, 2024 8:35 am

Thanks Enrico, now it works. :D

I would like to understand why your compilation
of calldll.prg works without inserting
#pragma warn -8019
#pragma warn -8004
#pragma warn -8075
#pragma warn -8080
#pragma warn -8061
#pragma warn -8060

Regards Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Compile with FW August 2024

Postby Enrico Maria Giordano » Fri Sep 27, 2024 8:43 am

Have you renamed it calldll.prg? Can I see you compile batch and your configuration file bcc32.cfg?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile with FW August 2024

Postby Maurizio » Fri Sep 27, 2024 9:00 am

This is bcc32.cfg ( It is the unmodified standard)
-I@\..\include\windows\crtl;@\..\include\windows\sdk;@\..\include\dinkumware
-O
-O1
-OS
-Ob
-Oc
-Ov
-c
-d
-g0
-k-
-v-
-w
-w!
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm


Re: Compile with FW August 2024

Postby Maurizio » Fri Sep 27, 2024 9:20 am

SET PATH=C:\BCC77\BIN;C:\fwh_24\HARBOUR_BCC77\bin\win\bcc;C:\WINDOWS;C:\WINDOWS\SYSTEM32
hbmk2 -inc -comp=bcc mastro.hbm fwh24.hbc -omastrosql -workdir=.beta_24/win/bcc
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Compile with FW August 2024

Postby Enrico Maria Giordano » Fri Sep 27, 2024 10:31 am

Maurizio wrote:SET PATH=C:\BCC77\BIN;C:\fwh_24\HARBOUR_BCC77\bin\win\bcc;C:\WINDOWS;C:\WINDOWS\SYSTEM32
hbmk2 -inc -comp=bcc mastro.hbm fwh24.hbc -omastrosql -workdir=.beta_24/win/bcc


I cannot help you with hbmk2, sorry. It is a very bugged tool. I fixed many bugs of it related to BCC64 and try to commit them in the Harbour repository but they never responded. Anyway, it surely is a tool that I would not use, bad written and impossible to maintain.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests