FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem linking with Xharbour commercial
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Problem linking with Xharbour commercial
Posted: Wed Nov 11, 2009 09:31 AM

Hi to all.
I'm converting a old Clipper and Fw software with the last FWH and Xharbour commercial and I have some linking errors.

xLINK: error: Unresolved external symbol '??2@YAPAXI@Z referenced from Fivehcm.lib(ACTX.obj)'.
xLINK: error: Unresolved external symbol '??3@YAXPAX@Z referenced from Fivehcm.lib(ACTX.obj)'.
xLINK: error: Unresolved external symbol '_OleUIPasteSpecialA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_GetFileVersionInfoSizeA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_GetFileVersionInfoA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_VerQueryValueA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: fatal error: 6 unresolved external(s).

What lib must I include ?
Thanks a lot.

Massimo.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem linking with Xharbour commercial
Posted: Wed Nov 11, 2009 12:54 PM

Massimo,

Please review this topic:

viewtopic.php?p=87279#p87279

The solution is explained there, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Problem linking with Xharbour commercial
Posted: Wed Nov 11, 2009 04:22 PM
Hi Antonio.
Thanks, now I can compile and link.
But I'm using an old Tsbrowse library, with some changes, and I must recompile it.
There are some errors during compilation. Is there something I can change ?
Thanks a lot.

Type: C >>>xhb.exe -o"obj\TSMULTI.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "TSMULTI.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\TSMULTI.obj'...

Type: C >>>xhb.exe -o"obj\BTNDOWN.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "BTNDOWN.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\BTNDOWN.obj'...

Type: C >>>xhb.exe -o"obj\SCRLLBAR.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "SCRLLBAR.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\SCRLLBAR.obj'...

Type: C >>>xhb.exe -o"obj\TSBROWSE.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "TSBROWSE.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\TSBROWSE.obj'...

Type: C >>>xhb.exe -o"obj\TSBTNGET.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "TSBTNGET.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\TSBTNGET.obj'...

Type: C >>>xhb.exe -o"obj\TSCOLUMN.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "TSCOLUMN.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\TSCOLUMN.obj'...

Type: C >>>xhb.exe -o"obj\TSCOMBO.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "TSCOMBO.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\TSCOMBO.obj'...

Type: C >>>xhb.exe -o"obj\TSGET.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "TSGET.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\TSGET.obj'...

Type: C >>>xhb.exe -o"obj\SBMSGITA.c" -m -n -pOobj\ -q -gc0 -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"c:\fwh\include" -I"C:\XHB\include" -I"C:\XHB\include\w32" "SBMSGITA.PRG"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\SBMSGITA.obj'...

Type: C >>>xcc.exe -Fo"obj\TSBFUNCS.obj" -Ot -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"C:\XHB\include" -I"C:\XHB\c_include" -I"C:\XHB\c_include\win" -I"C:\XHB\c_include\msvc" "c:\fwh\tsbrowse\c\TSBFUNCS.C"<<<

c:\fwh\include\fwHarb.h(45): warning: [ISO] No newline at end of file.

c:\fwh\tsbrowse\c\TSBFUNCS.C(80): warning: Conversion from 'struct HBRUSH__ *' to 'unsigned int' is undefined.

c:\fwh\tsbrowse\c\TSBFUNCS.C(528): warning: Missing prototype for '_reta'.


Type: C >>>xcc.exe -Fo"obj\GETBTN.obj" -Ot -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"C:\XHB\include" -I"C:\XHB\c_include" -I"C:\XHB\c_include\win" -I"C:\XHB\c_include\msvc" "c:\fwh\tsbrowse\c\GETBTN.C"<<<

c:\fwh\include\fwHarb.h(45): warning: [ISO] No newline at end of file.


Type: C >>>xcc.exe -Fo"obj\SCROLL.obj" -Ot -D__HARBOUR__ -D__FLAT__ -I"c:\fwh\include" -I"c:\xhb\c_include\win" -I"C:\XHB\include" -I"C:\XHB\c_include" -I"C:\XHB\c_include\win" -I"C:\XHB\c_include\msvc" "c:\fwh\tsbrowse\c\SCROLL.C"<<<

c:\fwh\include\fwHarb.h(45): warning: [ISO] No newline at end of file.

c:\fwh\tsbrowse\c\SCROLL.C(52): warning: Missing type specifier.

c:\fwh\tsbrowse\c\SCROLL.C(75): warning: Missing return value.

c:\fwh\tsbrowse\c\SCROLL.C(80): warning: Missing type specifier.

c:\fwh\tsbrowse\c\SCROLL.C(101): warning: Missing return value.

c:\fwh\tsbrowse\c\SCROLL.C(106): warning: Missing type specifier.

c:\fwh\tsbrowse\c\SCROLL.C(124): warning: Missing prototype for '_reta'.

c:\fwh\tsbrowse\c\SCROLL.C(128): warning: Missing return value.

c:\fwh\tsbrowse\c\SCROLL.C(133): warning: Missing type specifier.

c:\fwh\tsbrowse\c\SCROLL.C(140): warning: Missing return value.

c:\fwh\tsbrowse\c\SCROLL.C(145): warning: Missing type specifier.

c:\fwh\tsbrowse\c\SCROLL.C(160): warning: Missing return value.

Type: C >>>xlib.exe -out:"lib\tsbrowse.lib" "obj\TSMULTI.obj" "obj\BTNDOWN.obj" "obj\SCRLLBAR.obj" "obj\TSBROWSE.obj" "obj\TSBTNGET.obj" "obj\TSCOLUMN.obj" "obj\TSCOMBO.obj" "obj\TSGET.obj" "obj\SBMSGITA.obj" "obj\TSBFUNCS.obj" "obj\GETBTN.obj" "obj\SCROLL.obj" <<<
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem linking with Xharbour commercial
Posted: Wed Nov 11, 2009 09:33 PM

Massimo,

> c:\fwh\tsbrowse\c\TSBFUNCS.C(80): warning: Conversion from 'struct HBRUSH__ *' to 'unsigned int' is undefined.

Probably a ( HBRUSH ) hb_parnl( ... ) is missing

> c:\fwh\tsbrowse\c\TSBFUNCS.C(528): warning: Missing prototype for '_reta'.

Change it into hb_reta( ... )

If you post here scroll.c then we can provide you a better help :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Problem linking with Xharbour commercial
Posted: Thu Nov 12, 2009 09:40 AM

Hi Antonio.
Thanks a lot for you help.
Here is the scroll.c source

include <WinTen.h> // set proper path if needed

include <Windows.h>

include <ClipApi.h> // set proper path if needed

ifndef FLAT

ifndef HARBOUR

typedef struct
{
DWORD cbSize ;
DWORD fMask ;
long nMin ;
long nMax ;
DWORD nPage ;
long nPos ;
long nTrackPos ;
} SCROLLINFO ;
typedef SCROLLINFO FAR * LPSCROLLINFO ;

#define SIF_RANGE           1
#define SIF_PAGE            2
#define SIF_POS             4
#define SIF_DISABLENOSCROLL 8

#define SIF_TRACKPOS 16

endif

endif

//----------------------------------------------------------------------------//

static BOOL SetScrInfo( HWND hWnd, int nScrollBar, LPSCROLLINFO si, BOOL lRedraw)
{
#ifndef HARBOUR
typedef BOOL ( WINAPI * FN )( HWND, int, LPSCROLLINFO, BOOL ) ;

  FN p = ( FN ) GetProcAddress( GetModuleHandle( &quot;USER&quot; ), &quot;SetScrollInfo&quot; ) ;

  if( p )
     return ( p( ( HWND ) hWnd, nScrollBar, si, lRedraw ) ) ;
  else
     return ( FALSE ) ;

#else
return SetScrollInfo( hWnd, nScrollBar, si, lRedraw ) ;
#endif
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_SETSCROLLRANGE( PARAMS ) // ( hWnd, nFlags, nMin, nMax, lRepaint, lDisable, l32Bit )

else

CLIPPER SETSCROLLR( PARAMS ) // ANGE()

endif

{
SCROLLINFO si ;

si.cbSize = sizeof( si ) ;
si.fMask = SIF_RANGE ;
si.nMin = _parni( 3 ) ;
si.nMax = _parni( 4 ) ;

if (_parl(6))
si.fMask = SIF_RANGE + SIF_DISABLENOSCROLL ;

if (_parl(7))
_retl( SetScrInfo( ( HWND ) _parnl( 1 ), _parni( 2 ), &si, _parl( 5 ) ) ) ;
else // NT does not support SetScrollInfo() API function
_retni( SetScrollRange( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ), // Scroll Bar flags
_parni( 3 ), // Min
_parni( 4 ), // Max
_parl( 5 ) ) ) ; // ReDraw
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_SETSCROLLPOS( PARAMS ) // ( hWnd, nFlags, nPos, lRepaint, lDisable, l32Bit )

else

CLIPPER SETSCROLLP( PARAMS ) // OS

endif

{
SCROLLINFO si;

si.cbSize = sizeof( si );
si.fMask = SIF_POS;
si.nPos = _parni( 3 );

if (_parl(5))
si.fMask = SIF_POS + SIF_DISABLENOSCROLL ;

if ( _parl( 6 ) )
_retl( SetScrInfo( ( HWND ) _parnl( 1 ), _parni( 2 ), &si, _parl( 4 ) ) ) ;
else // NT does not support SetScrollInfo() API function
_retl( SetScrollPos( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ), // Scroll Bar flags
_parni( 3 ), // new Position
_parl( 4 ) ) ) ; // repaint
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_GETSCROLLRANGE( PARAMS ) // ( hWnd, nFlags )

else

CLIPPER GETSCROLLR( PARAMS ) // ANGE

endif

{
int iMin = 0, iMax = 0 ;

#ifdef FLAT
#ifndef HARBOUR
#define _storni( x, y, z ) STORNI( x, params, y, z )
#endif
#endif

GetScrollRange( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ), // Scroll bar flags
&iMin,
&iMax ) ;

_reta( 2 ) ; // { nMin, nMax }

_storni( iMin, -1, 1 ) ;
_storni( iMax, -1, 2 ) ;
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_GETSCROLLPOS( PARAMS ) // ( hWnd, nFlags )

else

CLIPPER GETSCROLLP( PARAMS ) // OS

endif

{
_retni( GetScrollPos( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ) ) ) ; // Scroll bar flags
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_SETSCROLLINFO( PARAMS ) // ( hWnd, nFlags, nSize, lRedraw, lShowDisabled )

else

CLIPPER SETSCROLLI( PARAMS ) // NFO()

endif

{
SCROLLINFO si;

si.cbSize = sizeof( si );
si.fMask = SIF_PAGE ;
si.nPage = _parni( 3 );

if ( _parl( 5 ) )
si.fMask += SIF_DISABLENOSCROLL ;

_retl( SetScrInfo( ( HWND ) _parnl( 1 ), _parni( 2 ), &si, _parl( 4 ) ) ) ;
}

//----------------------------------------------------------------------------//

Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: Problem linking with Xharbour commercial
Posted: Thu Nov 12, 2009 01:30 PM
Hello Massimo:
Massimo Linossi wrote:Hi Antonio.
Thanks, now I can compile and link.
But I'm using an old Tsbrowse library

How old is your TSBrowse version?

Massimo Linossi wrote:with some changes, and I must recompile it.

Are your changes documented? Could you send me the changelog ?

Massimo Linossi wrote:There are some errors during compilation. Is there something I can change ?

Please give me your email in order to send you a revised version that includes the required changes.

Best regards.
manuelmercado at prodigy dot net dot mx
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem linking with Xharbour commercial
Posted: Thu Nov 12, 2009 01:48 PM

Manuel,

Many thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Problem linking with Xharbour commercial
Posted: Thu Nov 12, 2009 02:36 PM

Hi Manuel.
It's a 4.0 version, a little bit old... :)
Sorry but all the changes aren't documented, and most of them are in the tsbrowse.prg file.
I can make them again, if you can send me the new library. So I can be another beta tester
for you. I've used you browse for a long time, in clipper version, and now that I'm converting
all the programs to xHarbour and the new FWH, it will be really nice to use you product.
Thanks for you help.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem linking with Xharbour commercial
Posted: Thu Nov 12, 2009 03:46 PM

Massimo,

We can fix and compile your modified C file, no problem :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Problem linking with Xharbour commercial
Posted: Thu Nov 12, 2009 04:49 PM

Hi Antonio.
I haven't modified C file. I made a lot of changes in prg files.
But are old changes, and my memory is going away...
Is a best solution to make a complete change, and to pass to all
new libraries. For this reason I'm using now the last FWH and the last Xharbour.
I know that is a hard work, but with an hard work now I can have a nice solution
for the future.
Thanks a lot and have a nice evening.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem linking with Xharbour commercial
Posted: Thu Nov 12, 2009 06:23 PM
Massimo,

Yes, the best way is to use the most recent code used by all of us. Anyhow, here is your code already fixed and compiling properly :-)
Code (fw): Select all Collapse
#include <Windows.h>
#include <hbapi.h>

//----------------------------------------------------------------------------//

static BOOL SetScrInfo( HWND hWnd, int nScrollBar, LPSCROLLINFO si, BOOL lRedraw)
{
   return SetScrollInfo( hWnd, nScrollBar, si, lRedraw ) ;
}

//----------------------------------------------------------------------------//

HB_FUNC( SETSCROLLRANGE ) // ( hWnd, nFlags, nMin, nMax, lRepaint, lDisable, l32Bit )
{
   SCROLLINFO si ;

   si.cbSize = sizeof( si ) ;
   si.fMask  = SIF_RANGE ;
   si.nMin   = hb_parni( 3 ) ;
   si.nMax   = hb_parni( 4 ) ;

   if (hb_parl(6))
      si.fMask = SIF_RANGE + SIF_DISABLENOSCROLL ;

   if (hb_parl(7))
      hb_retl( SetScrInfo( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ), &si, hb_parl( 5 ) ) ) ;
   else                                          // NT does not support SetScrollInfo() API function
      hb_retni( SetScrollRange( ( HWND ) hb_parnl( 1 ),        // its hWnd
                                      hb_parni( 2 ),         // Scroll Bar flags
                                      hb_parni( 3 ),         // Min
                                      hb_parni( 4 ),         // Max
                                      hb_parl( 5 ) ) ) ;     // ReDraw
}

//----------------------------------------------------------------------------//

HB_FUNC( SETSCROLLPOS ) // ( hWnd, nFlags, nPos, lRepaint, lDisable, l32Bit )
{
   SCROLLINFO si;

   si.cbSize = sizeof( si );
   si.fMask  = SIF_POS;
   si.nPos   = hb_parni( 3 );

   if (hb_parl(5))
      si.fMask = SIF_POS + SIF_DISABLENOSCROLL ;

   if ( hb_parl( 6 ) )
      hb_retl( SetScrInfo( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ), &si, hb_parl( 4 ) ) ) ;
   else                                               // NT does not support SetScrollInfo() API function
      hb_retl( SetScrollPos( ( HWND ) hb_parnl( 1 ),     // its hWnd
                                    hb_parni( 2 ),     // Scroll Bar flags
                                    hb_parni( 3 ),     // new Position
                                    hb_parl( 4 ) ) ) ; // repaint
}

//----------------------------------------------------------------------------//

HB_FUNC( GETSCROLLRANGE ) // ( hWnd, nFlags )
{
   int iMin = 0, iMax = 0 ;

   GetScrollRange( ( HWND ) hb_parnl( 1 ),  // its hWnd
                   hb_parni( 2 ),           // Scroll bar flags
                   &iMin,
                   &iMax ) ;

   hb_reta( 2 ) ;                            // { nMin, nMax }

   hb_storni( iMin, -1, 1 ) ;
   hb_storni( iMax, -1, 2 ) ;
}

//----------------------------------------------------------------------------//

HB_FUNC( GETSCROLLPOS ) // ( hWnd, nFlags )
{
   hb_retni( GetScrollPos( ( HWND ) hb_parnl( 1 ),     // its hWnd
                         hb_parni( 2 ) ) ) ;         // Scroll bar flags
}

//----------------------------------------------------------------------------//

HB_FUNC( SETSCROLLINFO ) // ( hWnd, nFlags, nSize, lRedraw, lShowDisabled )
{
   SCROLLINFO si;

   si.cbSize = sizeof( si );
   si.fMask  = SIF_PAGE ;
   si.nPage  = hb_parni( 3 );

   if ( hb_parl( 5 ) )
      si.fMask += SIF_DISABLENOSCROLL ;

   hb_retl( SetScrInfo( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ), &si, hb_parl( 4 ) ) ) ;
}

//----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Problem linking with Xharbour commercial
Posted: Fri Nov 13, 2009 06:51 AM

Thanks Antonio, you're great :D
A big handshake.

Continue the discussion