FWH 2407 and BCC770 unable to use UUID.LIB

FWH 2407 and BCC770 unable to use UUID.LIB

Postby Jimmy » Sun Sep 08, 2024 7: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: Select all  Expand view  RUN
HBDIR=c:\harbour
BCDIR=c:\BCC770
FWDIR=c:\fwh

it will be linked this Way
Code: Select all  Expand view  RUN
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
User avatar
Jimmy
 
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby nageswaragunupudi » Mon Sep 09, 2024 12:54 am

Try
Code: Select all  Expand view  RUN
cd\fwh\samples
buildh tutor01

Do you still get the same problem?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Jimmy » Mon Sep 09, 2024 4:52 am

hi,
Code: Select all  Expand view  RUN
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: Select all  Expand view  RUN
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: Select all  Expand view  RUN
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: Select all  Expand view  RUN
buildh64.bat Tutor01

seems to work

but using my Project with
Code: Select all  Expand view  RUN
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
User avatar
Jimmy
 
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Jimmy » Mon Sep 09, 2024 6:20 am

hi
here a full Sample which produce Error "unknown function(s): _SETWINDOWTHEME()"
Code: Select all  Expand view  RUN
#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: Select all  Expand view  RUN

#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: Select all  Expand view  RUN
-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: Select all  Expand view  RUN
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
User avatar
Jimmy
 
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Antonio Linares » Mon Sep 09, 2024 11:37 am

Dear Jimmy,

You have to link uxthemes.lib
regards, saludos

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

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Jimmy » 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
User avatar
Jimmy
 
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Antonio Linares » Mon Sep 09, 2024 1:01 pm

look for uxtheme.a
regards, saludos

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

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Jimmy » Mon Sep 09, 2024 2: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: Select all  Expand view  RUN
-LC:\BCC7764\lib\psdk -lUxtheme
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Jimmy » Tue Sep 10, 2024 4:42 am

hi

i have try again to use
Code: Select all  Expand view  RUN
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: Select all  Expand view  RUN
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /DDOS /w /p %2 %3 > comp.log

while missing
Code: Select all  Expand view  RUN
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: Select all  Expand view  RUN
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: Select all  Expand view  RUN
c:\bcc770\lib\uuid.lib

so i check more and found out that Error is in this line
Code: Select all  Expand view  RUN
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
User avatar
Jimmy
 
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Antonio Linares » Tue Sep 10, 2024 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Jimmy » Tue Sep 10, 2024 1: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
User avatar
Jimmy
 
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby Antonio Linares » Tue Sep 10, 2024 1:27 pm

Dear Jimmy,

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

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

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby TOTOVIOTTI » Tue Sep 10, 2024 7: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.edu.ar
User avatar
TOTOVIOTTI
 
Posts: 422
Joined: Fri Feb 05, 2010 11:30 am
Location: San Francisco - Córdoba - Argentina

Re: FWH 2407 and BCC770 unable to use UUID.LIB

Postby alerchster » Tue Sep 10, 2024 7:39 pm

Regards

Ing. Anton Lerchster
User avatar
alerchster
 
Posts: 95
Joined: Mon Oct 22, 2012 4:43 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests

cron