FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 2407 and BCC770 unable to use UUID.LIB
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Sun Sep 08, 2024 07:06 PM
hi

i try to use BCC770 and FWH 24.07 to recompile my APPS but have Problem, with UUID.LIB
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'UUID.LIB'
my *.MAK file
Code (fw): Select all Collapse
HBDIR=c:\harbour
BCDIR=c:\BCC770
FWDIR=c:\fwh
it will be linked this Way
Code (fw): Select all Collapse
echo c:\BCC770\lib\uuid.lib + >> b32.bc
and it is in
Directory c:\BCC770\lib
19.03.2015 06:55 2.048 uuid.lib
how to fix the Problem :?:
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Mon Sep 09, 2024 12:54 AM
Try
Code (fw): Select all Collapse
cd\fwh\samples
buildh tutor01
Do you still get the same problem?
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Mon Sep 09, 2024 04:52 AM
hi,
Code (fw): Select all Collapse
cd\fwh\samples
buildh tutor01
than i got
Compiling...
tutor01.prg(3) Error F0029 Can't open #include file 'FiveWin.ch'
Harbour 3.2.0dev (r2008190002)
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
* Compile errors *
my Environment are
Code (fw): Select all Collapse
c:\fwh\samples>set
BCDIR=c:\bcc770
FWDIR=C:\FWH
HBDIR=C:\HARBOUR
hdir=C:\HARBOUR
hdirl=C:\HARBOUR\lib\win\bcc
all Directory exist

when i try to use64 Bit Version and build64.bat use
Code (fw): Select all Collapse
echo %hdirl%\hbwin.a + >> b64.bc
which is IHMO wrong Extension as *.A is for MingGW and Extension for BCC is *.LIB

only MSVC
Code (fw): Select all Collapse
buildh64.bat Tutor01
seems to work

but using my Project with
Code (fw): Select all Collapse
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour64\bin\win\msvc64\hbmk2 dualgrid.hbp -comp=msvc64
still fail with
FiveH64.lib(window.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp_SetWindowTheme" in Funktion "HB_FUN__SETWINDOWTHEME".
DUALGRID.exe : fatal error LNK1120: 1 nicht aufgelöste Externe
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Mon Sep 09, 2024 06:20 AM
hi
here a full Sample which produce Error "unknown function(s): _SETWINDOWTHEME()"
Code (fw): Select all Collapse
#include "FIVEWIN.ch"
#include "common.ch"

PROCEDURE MAIN()
LOCAL oDlg, oListbox
LOCAL cDrive  := SPACE( 2 )
LOCAL cTitle  := "Please, select"
LOCAL aDrives := aDrives()

LOCAL bSetGet      := { | x | cDrive := x }
LOCAL bChange
LOCAL bValid
LOCAL bLDblClicked
LOCAL bWhen
LOCAL bDrawItem

alert(FWVERSION + HB_EOL())
   DEFINE DIALOG oDlg FROM 5, 10 TO 24, 55 TITLE cTitle

      oListbox := TListBox() :New( 10, 20, bSetGet, aDrives, 145, 95, bChange, ;
                             oDlg, bValid,,, .T., .F., ;
                             bLDblClicked,, "", .T., bWhen,, ;
                             bDrawItem, .F., .F. )

      @  7,  7 BUTTON "&OK" OF oDlg SIZE 40, 12 ;
             ACTION( USBeject( cDrive ), oDlg:End() ) DEFAULT

      @  7, 17 BUTTON "&Cancel" OF oDlg SIZE 40, 12 ;
              ACTION( cDrive := nil, oDlg:End() )

#IFDEF __HMG__
   END DIALOG
#ENDIF

   ACTIVATE DIALOG oDlg CENTERED

RETURN

STATIC PROCEDURE USBeject(cDriveLetter )
   IF EjectRemovable( cDriveLetter )
      MsgInfo( "The Drive " + cDriveLetter + " Can be Safely Removed", "Atenttion ! , Remove USB Ok" )
   ELSE
      MsgInfo( "Failed to Safely Remove/Eject Drive " + cDriveLetter , "Atenttion ! , Failed Remove USB" )
   ENDIF
RETURN
*+ EOF: FWEJECT.PRG
Code (fw): Select all Collapse
#pragma begindump

#include <windows.h>
#include <winioctl.h>
#include <tchar.h>
#include <stdio.h>
#include "hbapi.h"
#include "hbapifs.h"

// Prototypes
BOOL EjectVolume(TCHAR cDriveLetter);
HANDLE OpenVolume(TCHAR cDriveLetter);
BOOL LockVolume(HANDLE hVolume);
BOOL DismountVolume(HANDLE hVolume);
BOOL PreventRemovalOfVolume(HANDLE hVolume, BOOL fPrevent);
BOOL AutoEjectVolume(HANDLE hVolume);
BOOL CloseVolume(HANDLE hVolume);

LPTSTR szVolumeFormat = TEXT("\\\\.\\%c:");
LPTSTR szRootFormat = TEXT("%c:\\");

HANDLE OpenVolume(TCHAR cDriveLetter)
{
   HANDLE hVolume;
   UINT uDriveType;
   TCHAR szVolumeName[8];
   TCHAR szRootName[5];
   DWORD dwAccessFlags;

   wsprintf(szRootName, szRootFormat, cDriveLetter);
   uDriveType = GetDriveType(szRootName);

   switch(uDriveType)
   {
   case DRIVE_REMOVABLE:
     dwAccessFlags = GENERIC_READ | GENERIC_WRITE;
     break;
   case DRIVE_CDROM:
     dwAccessFlags = GENERIC_READ;
     break;
   default:
     return INVALID_HANDLE_VALUE;
   }

   wsprintf(szVolumeName, szVolumeFormat, cDriveLetter);

   hVolume = CreateFile( szVolumeName,
                         dwAccessFlags,
                         FILE_SHARE_READ | FILE_SHARE_WRITE,
                         NULL,
                         OPEN_EXISTING,
                         0,
                         NULL );
   return hVolume;
}

BOOL CloseVolume(HANDLE hVolume)
{
   return CloseHandle(hVolume);
}

#define LOCK_TIMEOUT        10000       // 10 Seconds
#define LOCK_RETRIES        20

BOOL LockVolume( HANDLE hVolume )
{
   DWORD dwBytesReturned;
   DWORD dwSleepAmount;
   int nTryCount;

   dwSleepAmount = LOCK_TIMEOUT / LOCK_RETRIES;

   for( nTryCount = 0; nTryCount < LOCK_RETRIES; nTryCount++ )
   {
     if( DeviceIoControl( hVolume, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0,
                          &dwBytesReturned, NULL ) )
         return TRUE;

     Sleep( dwSleepAmount );
   }

   return FALSE;
}

BOOL DismountVolume( HANDLE hVolume )
{
   DWORD dwBytesReturned;
   return DeviceIoControl( hVolume, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0,
                           &dwBytesReturned, NULL );
}

BOOL PreventRemovalOfVolume(HANDLE hVolume, BOOL fPreventRemoval)
{
   DWORD dwBytesReturned;
   PREVENT_MEDIA_REMOVAL PMRBuffer;
   PMRBuffer.PreventMediaRemoval = fPreventRemoval;
   return DeviceIoControl( hVolume, IOCTL_STORAGE_MEDIA_REMOVAL,
                           &PMRBuffer, sizeof(PREVENT_MEDIA_REMOVAL),
                           NULL, 0, &dwBytesReturned, NULL );
}

AutoEjectVolume( HANDLE hVolume )
{
   DWORD dwBytesReturned;
   return DeviceIoControl( hVolume, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0,
                         &dwBytesReturned,
                         NULL );
}

BOOL EjectVolume( TCHAR cDriveLetter )
{
   HANDLE hVolume;
   BOOL fRemoveSafely ; //  = FALSE;
   BOOL fAutoEject    ; //  = FALSE;

   hVolume = OpenVolume(cDriveLetter);
   if( hVolume == INVALID_HANDLE_VALUE )
     return FALSE;

   if( LockVolume(hVolume) && DismountVolume(hVolume) )
     fRemoveSafely = TRUE;
   {
     if (PreventRemovalOfVolume(hVolume, FALSE) && AutoEjectVolume(hVolume))
           fAutoEject = TRUE;
   }

   if( ! CloseVolume(hVolume) )
     return FALSE;

   return TRUE;
}

HB_FUNC( EJECTREMOVABLE )
{
   char * szDrive = hb_parc( 1 );
   hb_retl( EjectVolume( ( TCHAR ) *szDrive ) );
   return;
}

#pragma enddump
FWEJECT.HBP
Code (fw): Select all Collapse
-gui
-Ic:\fwh64\include
FWEJECT.PRG 
HB_FUNC.PRG
-Lc:\fwh64\lib
-lFiveH64
-lFiveHC64
-lgdiplus
-lole32
-lOleDlg
-lversion
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc
-ldflag=/NODEFAULTLIB:msvcrt
FWEJECT.rc
Code (fw): Select all Collapse
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour64\bin\win\msvc64\hbmk2 FWEJECT.HBP -comp=msvc64
Result Error
FWEJECT.c
FiveH64.lib(window.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp_SetWindowTheme" in Funktio
n "HB_FUN__SETWINDOWTHEME".
FWEJECT.exe : fatal error LNK1120: 1 nicht aufgelöste Externe
hbmk2: Error: Referenced, missing, but unknown function(s): _SETWINDOWTHEME()
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Mon Sep 09, 2024 11:37 AM

Dear Jimmy,

You have to link uxthemes.lib

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Mon Sep 09, 2024 12:22 PM
hi Antonio,
Antonio Linares wrote:You have to link uxthemes.lib
OK, 32 Bit Version have Uxtheme.lib, but on 64 Bit Version there is no Uxtheme.lib any more
(last was in C:\borland\bcc58\Lib\PSDK\Uxtheme.lib) !?
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Mon Sep 09, 2024 01:01 PM

look for uxtheme.a

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Mon Sep 09, 2024 02:38 PM
hi Antonio,
Antonio Linares wrote:look for uxtheme.a
YES, that work and i can build my App :D

i have to include in my *.HBP for MSVC 64 Bit this line
Code (fw): Select all Collapse
-LC:\BCC7764\lib\psdk -lUxtheme
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Tue Sep 10, 2024 04:42 AM
hi

i have try again to use
Code (fw): Select all Collapse
cd\fwh\samples
build tutor01
for 32 Bit and got to old Problem that BUILD.BAT does not work :!:

found out that it CRASH at this line
Code (fw): Select all Collapse
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /DDOS /w /p %2 %3 > comp.log
while missing
Code (fw): Select all Collapse
set fwh=%FWDIR%
in BUILD.BAT (got it from BUILD64.BAT)

but there is another Problem :
Compiling...
Harbour 3.2.0dev (r2008190002)
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
Lines 5029, Functions/Procedures 1
Generating C source output to 'tutor01.c'... Done.
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
tutor01.c:
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'UUID.LIB'
* Linking errors *
so i check PATH of UUiD.LIB
Code (fw): Select all Collapse
c:\fwh\samples>dir %bcdir%\lib\u*
 Verzeichnis von c:\bcc770\lib
19.03.2015  06:55             2.048 uuid.lib
it is OK and exist, so why i got a Error Message :?:

i check B32.BC and it contain
Code (fw): Select all Collapse
c:\bcc770\lib\uuid.lib
so i check more and found out that Error is in this line
Code (fw): Select all Collapse
c:\fwh\samples>%bcdir%\bin\ilink32 -Gn -Tpe -s @b32.bc
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'UUID.LIB'
Question : why does it CRASH :?:
what are wrong with Version 24.07 :evil:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Tue Sep 10, 2024 09:31 AM

Dear Jimmy,

Please start with a setup from scratch. Maybe you have mixed files.

Borland 7.7 sometimes fails with uuid.lib. Try to copy it where you are building your app too

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Tue Sep 10, 2024 01:13 PM
hi Antonio,
Antonio Linares wrote:Please start with a setup from scratch. Maybe you have mixed files.
Borland 7.7 sometimes fails with uuid.lib. Try to copy it where you are building your app too
i did remove BC770 and FWH 32 bit and have Setup both new.
it CRASH when run BUILD.BAT so i began to check all PATH and Environment %Variabel% like shown.

but under 32 Bit OS i still get Error Massage
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'UUID.LIB'
ALLMOST none of the Sample work using BUILD.BAT in my 32 Bit Environment :!:

i got it run under 64 Bit OS using
BUILDH64 Tutor01
 
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Tue Sep 10, 2024 01:27 PM
Dear Jimmy,

You have to use buildh.bat for Borland bcc 7.7 32 bits
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 470
Joined: Fri Feb 05, 2010 11:30 AM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Tue Sep 10, 2024 07:27 PM

Hola,

en mi caso, después de solucionar el tema del UUID, me salta el siguiente error al intentar compilar:

Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.

Error: Unresolved external '__streams' referenced from D:\FWH\LIB\DOLPHIN.LIB|function

Error: Unable to perform link

Que podrá ser?

Muchas gracias!

Roberto

Univ@c I.S.I.
Desarrolladores de Software
http://www.elcolegioencasa.ar
Posts: 137
Joined: Mon Oct 22, 2012 04:43 PM
Re: FWH 2407 and BCC770 unable to use UUID.LIB
Posted: Tue Sep 10, 2024 07:39 PM
Regards



Ing. Anton Lerchster

Continue the discussion