Page 1 of 1

Error after update for FWH 7.11

Posted: Fri Nov 30, 2007 12:41 am
by vilian
Hi,

Error: Unresolved external 'AdsCloseCachedTables' referenced from C:\XHARBOUR\LIB\RDDADS.LIB|adsfunc


Sds,
Vilian F. Arraes

Posted: Fri Nov 30, 2007 1:35 am
by Antonio Linares
Vilian,

From http://www.xharbour.org/index.asp?page=news/20050324:

# Added AdsCacheOpenTables() and AdsCacheOpenCursors() function. (for all versions Ads) and AdsCloseCachedTables() for Ads 7.x and above. ADS_REQUIRE_VERSION 7 must be set for the last function

# Allow setting of ADS_REQUIRE_VERSION using compiler command line switch

Posted: Fri Nov 30, 2007 1:58 am
by vilian
Antonio,

I did not understand. Not use AdsCloseCachedTables() in my system.

Posted: Fri Nov 30, 2007 8:58 am
by Antonio Linares
Vilian,

As a workaround try to add this code to your main PRG:

Code: Select all

#pragma BEGINDUMP

void AdsCloseCachedTables( void ) {}

#pragma ENDDUMP

Posted: Fri Nov 30, 2007 11:30 am
by vilian
Antonio,

Unhappyly it did not decide the problem.

Posted: Fri Nov 30, 2007 2:07 pm
by James Bott
Vilian,

If you are not using ADS, then there are two libs you should not be linking into you app. RDDADS.LIB and ACE32.LIB.

James

Posted: Fri Nov 30, 2007 3:40 pm
by Antonio Linares
Vilian,

> Unhappyly it did not decide the problem.

Do you get the same error ?

Posted: Fri Nov 30, 2007 5:44 pm
by vilian
Antonio,

The error message is the same one:

Code: Select all

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'AdsCloseCachedTables' referenced from C:\XHB\LIB\RDDADS.LIB|adsfunc
One will detail interesting that I observed is that in the installation of xHarbour that comes with FWH 7.11 does not have the Ace32.lib archive.

Posted: Fri Nov 30, 2007 7:57 pm
by Antonio Linares
Vilian,

> does not have the Ace32.lib archive

Thats because you have to create that library yourself from the used ACE32.dll:

implib.exe Ace32.lib Ace32.dll

Posted: Fri Nov 30, 2007 8:03 pm
by Antonio Linares
Vilian,

Try it this way:

Code: Select all

#pragma BEGINDUMP 

#include <windows.h>

void pascal AdsCloseCachedTables( void ) 
{
   MessageBox( 0, "inside AdsCloseCachedTables", "ok", 0 );
} 

#pragma ENDDUMP

Posted: Fri Nov 30, 2007 9:39 pm
by vilian
Antonio,

Now it´s fine. Thank you

Posted: Fri Dec 07, 2007 6:44 am
by hua
Antonio Linares wrote:
Try it this way:

Code: Select all

#pragma BEGINDUMP 

#include <windows.h>

void pascal AdsCloseCachedTables( void ) 
{
   MessageBox( 0, "inside AdsCloseCachedTables", "ok", 0 );
} 

#pragma ENDDUMP
When I got this error, initially I just try to create a stub function

Code: Select all

function AdsCLoseCachedTables()
return nil
But that didn't solve the problem. Only after putting in Antonio's code above does it links with no error. Out of curiousity, why is it so?

Ok, back to play with 7.12 :)

Posted: Fri Dec 07, 2007 7:02 am
by Antonio Linares
> Out of curiousity, why is it so?

Because the linker is requiring a C level function, not a PRG level one :-)