FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour error FWH 15.05 with xHarbour.com
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
error FWH 15.05 with xHarbour.com
Posted: Fri Jun 05, 2015 12:18 PM

error when I compile any prg /xHB.COM with FHX 15.5/

xLINK: warning: Symbol 'R:\lib\OptG.lib(hvm.obj)->_hb_vmPushSize previously defined at S:\lib\Fivehmx.lib(harbour.obj)' is multiply defined.
Creating object: t.EXP
Creating library: t.LIB
xLINK: error: Unresolved external symbol '_GetMenuInfo referenced from FiveHCM.lib(MENUDRAW.obj)'.
xLINK: error: Unresolved external symbol '_GetWindowLongPtr referenced from FiveHCM.lib(MENUDRAW.obj)'.
xLINK: error: Unresolved external symbol '_SetMenuInfo referenced from FiveHCM.lib(MENUDRAW.obj)'.
xLINK: fatal error: 3 unresolved external(s).

Type: C >>>Couldn't build: t.exe<<<
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>> 1406<<<

best regards

kajot
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: error FWH 15.05 with xHarbour.com
Posted: Fri Jun 05, 2015 02:13 PM

please include winapi.lib, please comment if this work.

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
Re: error FWH 15.05 with xHarbour.com
Posted: Fri Jun 05, 2015 03:11 PM

don't work

best regards

kajot
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: error FWH 15.05 with xHarbour.com
Posted: Fri Jun 05, 2015 04:17 PM
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: error FWH 15.05 with xHarbour.com
Posted: Fri Jun 05, 2015 04:17 PM

Same problem here.

Adding winapi.lib is no solution.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: error FWH 15.05 with xHarbour.com
Posted: Fri Jun 05, 2015 07:19 PM

We are reviewing it.

We will deliver a solution asap.

Thanks for the feedback :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: error FWH 15.05 with xHarbour.com
Posted: Fri Jun 05, 2015 07:34 PM
Ok, I found whats going on:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms633585%28v=vs.85%29.aspx

When compiling for 32-bit Windows, GetWindowLongPtr is defined as a call to the GetWindowLong function.


Please add this code to your main PRG:

#pragma BEGINDUMP

#include <windows.h>

LONG WINAPI GetWindowLongPtr( HWND hWnd, int nIndex )
{
return GetWindowLong( HWND hWnd, int nIndex );
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: error FWH 15.05 with xHarbour.com
Posted: Sat Jun 06, 2015 10:07 AM
Antonio,

I have added your suggestion to my main PRG-file.

But I got an error "couldn't build".

Just for your information. I do have 2 more of those parts in my main PRG-file.

These look like :
Code (fw): Select all Collapse
******************************************************************************

#pragma BEGINDUMP

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

HB_FUNC( NEXTMEM ) // --> nHardwareMemory
{
   MEMORYSTATUSEX mst;

   memset( &mst, 0, sizeof( MEMORYSTATUSEX ) );
   mst.dwLength = sizeof( MEMORYSTATUSEX );

   GlobalMemoryStatusEx( &mst );

   hb_retnll( mst.ullAvailPhys );
}

#pragma ENDDUMP

******************************************************************************

#pragma BEGINDUMP

#include <stdio.h>
#include <Windows.h>
#include <WinINet.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapifs.h>
#include <hbvm.h>
#include <hbstack.h>

static int mystrcmp( char *val1, char *val2 )
{
        int     nret = 0 ;

        for ( ; *val1 ; val1++, val2++ )  {
                if ( ! *val2 || *val1 != *val2 )  {
                        nret = 1 ;
                        break ;
                }
        }
        if ( ! nret && *val2 )
                nret = 1 ;

        return nret ;
}

HB_FUNC( DELFILECACHE )
{
        BOOL                            bResult = FALSE ;
        BOOL                            bDone = FALSE ;
        LPINTERNET_CACHE_ENTRY_INFO     lpCacheEntry = NULL ;
        DWORD                           dwTrySize, dwEntrySize = 4096 ; // start buffer size
        HANDLE                          hCacheDir = NULL ;
        DWORD                           dwError = ERROR_INSUFFICIENT_BUFFER ;
        BOOL                            bSuccess ;
        PHB_ITEM                        iFiles, iElem ;
        int                             nfile, npos ;
        char                            buffile[FILENAME_MAX] ;

        iFiles = hb_itemParam( 1 ) ;
        nfile = hb_parinfa( 1, 0 ) ;

        do  {
                switch ( dwError )  {
                        // need a bigger buffer
                        case ERROR_INSUFFICIENT_BUFFER :
                                if ( lpCacheEntry != NULL )
                                        free( (LPBYTE)lpCacheEntry ) ;
                                lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) malloc( dwEntrySize ) ;
                                lpCacheEntry->dwStructSize = dwEntrySize ;
                                dwTrySize = dwEntrySize ;

                                if ( hCacheDir == NULL )
                                        bSuccess = (hCacheDir = FindFirstUrlCacheEntry( NULL, lpCacheEntry, &dwTrySize )) != NULL ;
                                else
                                        bSuccess = FindNextUrlCacheEntry(hCacheDir, lpCacheEntry, &dwTrySize ) ;
                                if ( bSuccess )
                                        dwError = ERROR_SUCCESS ;
                                else  {
                                        dwError = GetLastError() ;
                                        dwEntrySize = dwTrySize ; // use new size returned
                                }
                                break ;

                        // we are done
                        case ERROR_NO_MORE_ITEMS :
                                bDone = TRUE ;
                                bResult = TRUE ;
                                break ;

                        // we have got an entry
                        case ERROR_SUCCESS:
                                // don't delete cookie entry

                                if ( !( lpCacheEntry->CacheEntryType & COOKIE_CACHE_ENTRY ) )  {
                                        for ( npos = 1 ; npos <= nfile ; npos++ )  {
                                                iElem = hb_itemArrayGet( iFiles, npos ) ;

                                                hb_itemCopyC( iElem, buffile, 0 ) ;
                                                buffile[hb_itemSize( iElem )] = '\0' ;

                                                if ( ! mystrcmp( (char *)(lpCacheEntry->lpszSourceUrlName), buffile ) )  {
                                                        DeleteUrlCacheEntry( lpCacheEntry->lpszSourceUrlName ) ;
                                                        break ;
                                                }
                                        }
                                }

                                // get ready for next entry
                                dwTrySize = dwEntrySize;
                                if ( FindNextUrlCacheEntry(hCacheDir, lpCacheEntry, &dwTrySize ) )
                                        dwError = ERROR_SUCCESS ;
                                else  {
                                        dwError = GetLastError() ;
                                        dwEntrySize = dwTrySize ; // use new size returned
                                }
                                break;

                        // unknown error
                        default:
                                bDone = TRUE ;
                                break ;
                }
                if ( bDone )  {
                        free( (LPBYTE)lpCacheEntry ) ;
                        if ( hCacheDir )
                                FindCloseUrlCache( hCacheDir ) ;
                }
        }  while ( !bDone ) ;

        hb_retnl( bResult ) ;
}

#pragma ENDDUMP

*****************************************************************************

#pragma BEGINDUMP

#include <windows.h>

LONG WINAPI GetWindowLongPtr( HWND hWnd, int nIndex )
{
        return GetWindowLong( HWND hWnd, int nIndex );
}

#pragma ENDDUMP

*****************************************************************************
Is that a problem?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: error FWH 15.05 with xHarbour.com
Posted: Sat Jun 06, 2015 10:16 AM
Antonio,

Just a hint.

If I recompile my application with Harbour, I got an error like this :
Improper use of typedef 'HWND' in function GetWindowLongA
Function call ) missing in function GetWindowLongA

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: error FWH 15.05 with xHarbour.com
Posted: Sat Jun 06, 2015 01:58 PM
Michel,

It seems that if you have several #pragma BEGINDUMP ENDDUMP they get compiled fine, so it is should not be a problem to have some of them.

That code is only for xHarbour so for Harbour you need to modify it this way:

Code (fw): Select all Collapse
#ifndef __BORLANDC__
#pragma BEGINDUMP

#include <windows.h>

LONG WINAPI GetWindowLongPtr( HWND hWnd, int nIndex )
{
        return GetWindowLong( HWND hWnd, int nIndex );
}

#pragma ENDDUMP
#endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: error FWH 15.05 with xHarbour.com
Posted: Sat Jun 06, 2015 10:12 PM

Antonio,

I just deleted your code and everything is ok with build 2.

Thanks a lot.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: error FWH 15.05 with xHarbour.com
Posted: Sun Jun 07, 2015 12:36 AM
driessen wrote:Antonio,

I just deleted your code and everything is ok with build 2.

Thanks a lot.

You mean everything ok with xharbour commerical?
Regards



G. N. Rao.

Hyderabad, India
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: error FWH 15.05 with xHarbour.com
Posted: Sun Jun 07, 2015 08:41 AM

Yes, Mr. Rao.

I was able to rebuild my application with FWH 15.05 build 2 without any change to my code, as well with Harbour as with xHarbour Professional (commercial).

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: error FWH 15.05 with xHarbour.com
Posted: Sun Jun 07, 2015 10:25 AM

Michel,

very good :-)

many thanks for your feedback

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: error FWH 15.05 with xHarbour.com
Posted: Thu Aug 13, 2015 06:13 PM

Antonio,

It seems that the same problem is reoccuring in FWH 15.07.

Can you solve that?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773