Problem with FiveHCM.lib

Problem with FiveHCM.lib

Postby mtajkov » Wed Nov 21, 2012 6: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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Problem with FiveHCM.lib

Postby Antonio Linares » Wed Nov 21, 2012 7:44 am

regards, saludos

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

Re: Problem with FiveHCM.lib

Postby mtajkov » Wed Nov 21, 2012 4:33 pm

This is the new code:

Code: Select all  Expand view
// 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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Problem with FiveHCM.lib

Postby Antonio Linares » Wed Nov 21, 2012 8:07 pm

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

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

Re: Problem with FiveHCM.lib

Postby nnicanor » 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
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Problem with FiveHCM.lib

Postby mtajkov » Thu Nov 22, 2012 6:03 am

I did everything you said but now I have a new error:

Code: Select all  Expand view
// 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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Problem with FiveHCM.lib

Postby Antonio Linares » Thu Nov 22, 2012 10:45 am

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

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

Re: Problem with FiveHCM.lib

Postby mtajkov » Thu Nov 22, 2012 1: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: Select all  Expand view
// 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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Problem with FiveHCM.lib

Postby Antonio Linares » Thu Nov 22, 2012 3:59 pm

Please remove the keyword WINAPI from the code
regards, saludos

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

Re: Problem with FiveHCM.lib

Postby mtajkov » Thu Nov 22, 2012 7:19 pm

New code:
Code: Select all  Expand view
// 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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Problem with FiveHCM.lib

Postby nnicanor » Thu Nov 22, 2012 9: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
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Problem with FiveHCM.lib

Postby mtajkov » Fri Nov 23, 2012 6: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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Problem with FiveHCM.lib

Postby Antonio Linares » Fri Nov 23, 2012 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem with FiveHCM.lib

Postby mtajkov » 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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Problem with FiveHCM.lib

Postby mtajkov » Sun Nov 25, 2012 2: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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests