Build error xsc

This forum is meant for questions and discussions about the X# language and tools
User avatar
Chris
Posts: 4910
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Build error xsc

Post by Chris »

Hi Stefan,

As Robert said, can you please zip the whole solution folder and send it to either of us to have a look? Preferably to me, to look closely into it and prepare a cut down sample for Robert to fix more easily.

I have seen it also myself that in a few cases the compile did not report correct column/line information and thought we had fixed all those cases, but apparently there do exit some more. But we need the code to be able to reproduce and fix those as well.

TIA,
Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
SHirsch
Posts: 286
Joined: Tue Jan 30, 2018 8:23 am
Location: Germany

Build error xsc

Post by SHirsch »

Hello Chris,

I send my sources to Robert one minute before your message.
If you give me your e-mail address I will send you the sources too.

Stefan
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Build error xsc

Post by robert »

Chris,

Check your mail.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4910
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Build error xsc

Post by Chris »

Stefan, Robert,

Thanks, nice circular reference thing we did here :)

To be serious though, Stefan, thanks for your report and for providing the code for investigation! As it turns out, the compiler errors are reported because of:

1. in "Ads, ServerInfo.prg":

Code: Select all

ACCESS FCount as DWORD PASCAL 
   LOCAL nFCount as DWORD
   ...
   AdsGetNumFields(self:hTable, @nFCount)
"nFCount" must be defined as WORD, as this is what AdsGetNumFields() expects.

2. in "Ads, Server.prg":

Code: Select all

ACCESS FCount as DWORD PASCAL 
   LOCAL nFCount as DWORD
   ...
   self:LastError:Error := AdsGetNumFields(self:hCursor, @nFCount)
same thing, "nFCount" should be defined as WORD

3. also in "Ads, Server.prg":

Code: Select all

ACCESS RecNo as int PASCAL 
   LOCAL nRecNo as int
   ...
   self:LastError:Error := AdsGetRecordNum(self:hCursor, ADS_IGNOREFILTERS, @nRecNo)
Here "nRecNo" must be defined as DWORD.

After making those changes, the library compiles fine!

Of course the actual problem here is that the compiler did not report file/line information together with the error messages, so it was impossible for Stefan to find what was causing them. I will create a small repro sample for this and log it in order to be fixed.

Chris

ps. my email is same as Robert's, except replace "robert" with "chris".
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Chris
Posts: 4910
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Build error xsc

Post by Chris »

Hi Stefan,

Just to let you know (and everybody else), we have also found what's causing the problem with no location info shown on some error messages. This happens with errors within ACCESS/ASSIGN bodies, which are declared within PARTIAL CLASSes. (Like your accesses inside the partial classes kdAdsServer and kdAdsServerInfo).

Thanks for your help finding this problem, I think it should be fixed in the next release.

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply