FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with FiveHCM.lib
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Problem with FiveHCM.lib
Posted: Wed Nov 21, 2012 06:38 AM

I tried to compiling testgif.prg but:

Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:windows -UNMANGLE -LIBPATH:"D:\FWH\lib" -LIBPATH:"D:\xHB2011\Lib" -LIBPATH:"D:\xHB2011\c_lib" -LIBPATH:"D:\xHB2011\c_lib\win"  "obj32\testgif.obj" "obj32\scintila.obj" "D:\xHB2011\Lib\mem32.lib" "D:\xHB2011\Lib\send32.lib" "FiveHCM.lib" "FiveHMX.lib" "OptG.lib" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib winmm.lib lz32.lib Netapi32.lib -out:"testgif.exe"<<<

Creating object: testgif.EXP

Creating library: testgif.LIB

xLINK: error: Unresolved external symbol '_GetWindowLongPtr referenced from FiveHCM.lib(FWGIF.obj)'.

xLINK: fatal error: 1 unresolved external(s).

Type: C >>>Couldn't build: testgif.exe<<<

Type: C >>>TMAKEPROJECT<<<

Type: C >>>TMAKEPROJECT:REFRESH<<<

Type: N >>>      1409<<<

Regards,
Miloš

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with FiveHCM.lib
Posted: Wed Nov 21, 2012 07:44 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: Problem with FiveHCM.lib
Posted: Wed Nov 21, 2012 04:33 PM
This is the new code:

Code (fw): Select all Collapse
// Animated GIFs support for FWH
#include "FiveWin.ch"
#pragma BEGINDUMP
#ifndef _WIN64

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

#endif

#pragma ENDDUMP

function Main()

   local oWnd
   
   DEFINE WINDOW oWnd TITLE "Animated GIFs"

   TGif():New( oWnd, "..\gifs\halo.gif", 10, 10 )
   
   ACTIVATE WINDOW oWnd

return nil


but:

Lines 30, Functions/Procedures 1

Generating C source output to 'obj32\testgif.c'...
Generating object output to 'obj32\testgif.obj'...
testgif.prg(9): warning: Missing type specifier.
testgif.prg(9): error: Syntax error; found 'WINAPI' expecting ';'.
testgif.prg(9): warning: Missing type specifier.
testgif.prg(9): error: Syntax error; found 'GetWindowLongPtr' expecting ';'.
testgif.prg(9): warning: Missing type specifier.
testgif.prg(9): error: Syntax error; found 'hWnd' expecting ')'.
testgif.prg(9): error: Syntax error; found ')' expecting ';'.
testgif.prg(9): error: Declared parameter 'nIndex' is missing.
testgif.prg(11): warning: Missing prototype for 'GetWindowLongPtr'.
testgif.prg(11): error: Syntax error; found 'GetWindowLong' expecting '{'.
testgif.prg(11): warning: Missing prototype for 'GetWindowLong'.
testgif.prg(11): error: Undeclared identifier 'hWnd'.
testgif.prg(11): error: Undeclared identifier 'nindex'.
testgif.prg(12): warning: Missing return value.


Type: C >>>Couldn't build: testgif.obj<<<
Type: C >>>TMAKEOBJECT<<<
Type: C >>>TMAKEOBJECT:REFRESH<<<
Type: N >>> 1409<<<

Do you know what the problem is?

Regards,
Miloš
Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with FiveHCM.lib
Posted: Wed Nov 21, 2012 08:07 PM

include <windows.h> is missing after the #pragma BEGINDUMP

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: Problem with FiveHCM.lib
Posted: Wed Nov 21, 2012 10:16 PM

In line

return GetWindowLong( hWnd, nindex );

you must replace nindex by nIndex

return GetWindowLong( hWnd, nIndex );

Regards

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: Problem with FiveHCM.lib
Posted: Thu Nov 22, 2012 06:03 AM
I did everything you said but now I have a new error:

Code (fw): Select all Collapse
// Animated GIFs support for FWH

#include "FiveWin.ch"

#pragma BEGINDUMP

#include "windows.h"

#ifndef _WIN64

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

#endif

#pragma ENDDUMP


function Main()

   local oWnd
   
   DEFINE WINDOW oWnd TITLE "Animated GIFs"

   TGif():New( oWnd, "..\gifs\halo.gif", 10, 10 )
   
   ACTIVATE WINDOW oWnd

return nil


Lines 33, Functions/Procedures 1
Generating C source output to 'obj32\testgif.c'...
Generating object output to 'obj32\testgif.obj'...
testgif.prg(13): error: Undeclared identifier 'nIndex'.

Type: C >>>Couldn't build: testgif.obj<<<
Type: C >>>TMAKEOBJECT<<<
Type: C >>>TMAKEOBJECT:REFRESH<<<
Type: N >>> 1409<<<

Regards,
Miloš
Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with FiveHCM.lib
Posted: Thu Nov 22, 2012 10:45 AM
LONG_PTR WINAPI GetWindowLongPtr( HWND hWnd, int nIndex )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: Problem with FiveHCM.lib
Posted: Thu Nov 22, 2012 01:31 PM
We went back to the beginning

Creating object: test.EXP
Creating library: test.LIB
xLINK: error: Unresolved external symbol '_GetWindowLongPtr referenced from FiveHCM.lib(FWGIF.obj)'.
xLINK: fatal error: 1 unresolved external(s).

for this code:

Code (fw): Select all Collapse
// Animated GIFs support for FWH
#include "FiveWin.ch"

#pragma BEGINDUMP

#include <windows.h>

#ifndef _WIN64

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

#endif


#pragma ENDDUMP


function Main()

   local oWnd
   
   DEFINE WINDOW oWnd TITLE "Animated GIFs"

   TGif():New( oWnd, "..\gifs\halo.gif", 10, 10 )
   
   ACTIVATE WINDOW oWnd

return nil


Regards,
Miloš
Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with FiveHCM.lib
Posted: Thu Nov 22, 2012 03:59 PM

Please remove the keyword WINAPI from the code

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: Problem with FiveHCM.lib
Posted: Thu Nov 22, 2012 07:19 PM
New code:
Code (fw): Select all Collapse
// Animated GIFs support for FWH

#include "FiveWin.ch"

#pragma BEGINDUMP

#include <windows.h>

#ifndef _WIN64

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

#endif

#pragma ENDDUMP


function Main()

   local oWnd
   
   DEFINE WINDOW oWnd TITLE "Animated GIFs"

   TGif():New( oWnd, "..\gifs\halo.gif", 10, 10 )
   
   ACTIVATE WINDOW oWnd

return nil


New error:

Lines 33, Functions/Procedures 1
Generating C source output to 'obj32\testgif.c'...
Generating object output to 'obj32\testgif.obj'...
testgif.prg(12): error: Redeclaration of 'GetWindowLongA' previously declared at D:\FWH\include\winuser.h(4331): found 'long int __cdecl function(struct HWND__ *, int)' expected 'long int __stdcall function(struct HWND__ *, int)'.

Type: C >>>Couldn't build: testgif.obj<<<
Type: C >>>TMAKEOBJECT<<<
Type: C >>>TMAKEOBJECT:REFRESH<<<
Type: N >>> 1409<<<

Regards,
Miloš
Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: Problem with FiveHCM.lib
Posted: Thu Nov 22, 2012 09:48 PM

You must add flowing parameters to link

/FORCE:MULTIPLE /ignore:4006

Regards,

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: Problem with FiveHCM.lib
Posted: Fri Nov 23, 2012 06:18 AM

Antonio,

Sorry, but I'm not sure where to add parameters to link

/ FORCE: MULTIPLE / ignore: 4006

because I use xBuildW.exe

Regards,
Miloš

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with FiveHCM.lib
Posted: Fri Nov 23, 2012 09:18 AM
Instead of the above, please try this:

#include <windows.h>

#ifndef _WIN64

#undef GetWindowLongPtr

LONG_PTR GetWindowLongPtr( HWND hWnd, int nIndex )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: Problem with FiveHCM.lib
Posted: Fri Nov 23, 2012 10:55 AM

Now it's okay!
Thank you Antonio.

Regards,
Miloš

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: Problem with FiveHCM.lib
Posted: Sun Nov 25, 2012 02:16 PM

I want to show an animated gif (loading.gif) when the computer is busy (something like msgmeter). But if after

TGIF (): New (oWnd, ".. \ gifs \ halo.gif", 10, 10)

I try:

nErr: = oSql: exec ("SELECT ..................",. t.,, "Temp.dbf")

animation starts only after the execution of queries!?

Regards,
Miloš

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]