RDDADS.LIB for xHarbour

Post Reply
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

RDDADS.LIB for xHarbour

Post by James Bott »

Recently I got the RDDADS.LIB for Harbour running by recompiling it after making a slight change to make it compatible with ADS ver 6 and greater. Now I am trying to use it with xHarbour, but it is erroring out when the app is run with "'Program with 1st fun: _ADS' was compiled with older version, PCODE version 0 is no longer supported - Please recompile."

The RDDADS.LIB only contains 3 C programs. They were compiled with Borland C. I have had a similar error message before, but it was due to compiling with an older version of Harbour, not Borland C.

Here are the lines from my make file:

Code: Select all

.c.obj:
  $(BIN_DIR)\bcc32 $(CLIBFLAGS) $(C_USR) -c -O2 -DWIN32 -DADS_REQUIRE_VERSION6 -I$(INCLUDE_DIR) -o$@ $<
  tlib $(LIB_DIR)\rddads.lib -+$@,,
Am I using the wrong parameters for Borland C perhaps? Do I need different versions of RDDADS.LIB for Harbour and xHarbour?

Regards,
James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

James,

It is not a Borland issue, it is a xharbour error msg as you have PRGs compiled with different xharbour versions.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Antonio,

Well, that is what I would have guessed, but, I am only compiling one PRG using buildx.bat and the error message refers to the _ADS function which is not in my PRG so I assume it is in one of the three C modules in RDDADS.LIB.

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

James,

RDDADS.lib requires (link) some PRGs from the RDD system that may be compiled with a different xharbour version.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Antonio,

If I use Tlib to list the modules in RDDADS.LIB there are only three, ADS1, ADSFUNC, and ADSMGMNT. The function specified in the error _ADS is in ADS1:

Code: Select all

ADS1    	size = 18866
	_FoxToDbl                         _HB_FUN_ADSCUSTOMIZEAOF
	_HB_FUN_ADSGETRELKEYPOS           _HB_FUN_ADSSETRELKEYPOS
	_HB_FUN_ADS_GETFUNCTABLE          _HB_FUN__ADS
	_adsCloseCursor                   _adsEof
	_adsExists                        _adsFieldInfo
	_adsSetListener_callback
I have listed the modules in several copies of RDDADS.LIB and they are all the same.

Reinaldo tells me there is an ADS0.PRG, but I cannot find it anywhere. Does anyone know about this prg?

James
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

OK, I found the ADS0.PRG in a new download of xHarbour. All it contains is this:

Code: Select all

#include "error.ch"
#include "rddsys.ch"

ANNOUNCE ADS

procedure ADSInit

   REQUEST _ADS

   rddRegister( "ADS", RDT_FULL )

return
I just copied the code and pasted it into my PRG and I still get the same PCODE error.

Any other ideas, anyone?

James
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

James

The latest xHarbour has changed the way you set up ADS ..

REQUEST ADS

rddRegister ( "ADS", 1 ) // no underscore _ infront of ADS
rddsetdefault( "ADS" )
SET SERVER REMOTE
SET FILETYPE to CDX


Notice the underscore is gone .. just use as above.

Rick Lipkin
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Rick,

I forgot to mention the versions I am using; FWH2.6, May 2005 build, xHarbour 0.99.3 (not the latest version). So, I presume you suggestion doesn't apply.

I may have also resolved the ADS0.PRG issue. It appears that this was only used in older versions of xHarbour. That is why I couldn't find it in my versions.

James
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Antonio,

I found the problem, but I still don't know the solution. I had created the ACE32.LIB as you showed me, but the ACE32.DLL was still in the same directory as my test code. When I compiled the test code under Harbour it ran OK. But when I compiled under xHarbour I got the PCODE error.

I copied the test code to a new test directory and compiled and linked the test again and I got an ACE32.DLL not found error (even though I am linking in the ACE32.LIB). I put a copy of ACE32.DLL in the same directory and that error went away and I got the PCODE error. So, it seems that it still wants the ACE32.DLL even though I am linking in the ACE32.LIB. And the ACE32.DLL is causing the PCODE error.

Any ideas how to fix this?

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

James,

ace32.lib does not contains code. It is an "import library" to access ace32.dll

The pcode error does not comes from ace32.dll. It comes from one of your compiled PRGs or one of the xharbour used PRGs.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Antonio,

OK, so if I understand it correctly I need both the ASC32.DLL and the ACE32.LIB?

My entire test program has been narrowed down to this?

Code: Select all

function main()
   msgInfo("start")
   request _ads
return nil
When the program is run it errors out with the PCODE error before it even gets to the msgInfo(). I am compiling this with xHarbour 0.99.3 (using the original binaries). I am not compiling any other PRGs. I am using the buildx.bat file.

There are three C modules in the RDDADS.LIB, ads1.c, adsfunc.c, and adsmgmnt.c. These C modules are those that came with the xHarbour contrib source. There were no PRGs. I compiled the C modules into OBJ's using Borland C and then put them all into the RDDADS.LIB.

I don't know C. When I look in ADS1.C it looks like hand coded C to me. When I look in both ADSFUNC.C and ADSMGMNT.C they look like they may have been compiled into C using Harbour or xHarbour since they contain a lot of "HB_FUNC" code. Is this maybe the problem, they were compiled into the C modules that I have, but the PRG's were not included? If so, does anyone know who wrote that code and/or where I could get the PRGs?

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

James,

The problem must be in the xharbour build libraries that you are using.

Please download xharbour from here:
www.fivetechsoft.com/files/xharbour.exe

and use buildx.bat to build this sample:

function main()
request ads
? "ok"
return nil

Please notice that in your buildx.bat you have to add hbsix.lib and dbffpt.lib
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Antonio,

After compiling with the newer version of xHarbour I get this error:

Error: Unresolved external '_hb_stack' referenced from c:\fhw\lib\fivehc.lib:ffwndrun

I tried not linking in fivehc.lib, but then I get the same error refering to ADS1 instead.

So, I guess I can't do this without upgrading to the newer version of FWH.

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

James,

> Error: Unresolved external '_hb_stack'

Yes, that error is caused by recent changes in both harbour/xharbour. A new fivehc.lib is required.

But to test the above sample I mentioned, you don't need FWH. Please run that test to check if you are using a right xharbour build.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

But to test the above sample I mentioned, you don't need FWH. Please run that test to check if you are using a right xharbour build.
I did run your test, compiled with buildx.bat. That is when I got the error. Then I removed fivehc.lib from the buildx.bat file, and I still got the error because apparently ADS1.C is calling _hb_stack also.

However, Rick Lipkin set me a new set of files, ace32.lib, ace32.dll, and rddads.lib and they ran without the error I have been getting. Unfortunately, I cannot connect to the remote server when using them. I can connnect using the same code when compiled with Harbour.

So, it seems, I have traded one problem for another. I'll have to keep working on it.

James
Post Reply