error FWH 15.05 with xHarbour.com

error FWH 15.05 with xHarbour.com

Postby kajot » 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
User avatar
kajot
 
Posts: 332
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: error FWH 15.05 with xHarbour.com

Postby carlos vargas » Fri Jun 05, 2015 2:13 pm

please include winapi.lib, please comment if this work.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1683
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: error FWH 15.05 with xHarbour.com

Postby kajot » Fri Jun 05, 2015 3:11 pm

don't work
best regards
kajot
User avatar
kajot
 
Posts: 332
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: error FWH 15.05 with xHarbour.com

Postby carlos vargas » Fri Jun 05, 2015 4:17 pm

Last edited by carlos vargas on Fri Jun 05, 2015 4:22 pm, edited 5 times in total.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1683
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: error FWH 15.05 with xHarbour.com

Postby driessen » Fri Jun 05, 2015 4:17 pm

Same problem here.

Adding winapi.lib is no solution.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.02 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc77
User avatar
driessen
 
Posts: 1396
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: error FWH 15.05 with xHarbour.com

Postby Antonio Linares » Fri Jun 05, 2015 7:19 pm

We are reviewing it.

We will deliver a solution asap.

Thanks for the feedback :-)
regards, saludos

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

Re: error FWH 15.05 with xHarbour.com

Postby Antonio Linares » Fri Jun 05, 2015 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: error FWH 15.05 with xHarbour.com

Postby driessen » 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: Select all  Expand view
******************************************************************************

#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. 24.02 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc77
User avatar
driessen
 
Posts: 1396
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: error FWH 15.05 with xHarbour.com

Postby driessen » 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. 24.02 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc77
User avatar
driessen
 
Posts: 1396
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: error FWH 15.05 with xHarbour.com

Postby Antonio Linares » Sat Jun 06, 2015 1: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: Select all  Expand view

#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: error FWH 15.05 with xHarbour.com

Postby driessen » 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. 24.02 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc77
User avatar
driessen
 
Posts: 1396
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: error FWH 15.05 with xHarbour.com

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10247
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: error FWH 15.05 with xHarbour.com

Postby driessen » Sun Jun 07, 2015 8: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. 24.02 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc77
User avatar
driessen
 
Posts: 1396
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: error FWH 15.05 with xHarbour.com

Postby Antonio Linares » Sun Jun 07, 2015 10:25 am

Michel,

very good :-)

many thanks for your feedback
regards, saludos

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

Re: error FWH 15.05 with xHarbour.com

Postby driessen » Thu Aug 13, 2015 6: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. 24.02 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc77
User avatar
driessen
 
Posts: 1396
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 62 guests