Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-04

Codetools fails to compile under WinCE

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

patspiper

Hi,

SQLDB package uses codetools, and thus whenever it is included in a WinCE project the following error pops up upon compilation:

.../lazarus-svn/components/codetools/fileprocs.pas(287,10) Error: Forward declaration not solved
"dbgMemRange(PByte;LongInt;LongInt="0"):AnsiString;"

dbgMemRange is defined in:
- lclproc.pas
- LazLoggerIntf.inc
- fileprocs.pas

LazLoggerIntf.inc is included in lazlogger.pas, lazloggerdummy.pas and lozloggerbase.pas.

As FileProcs uses LazLogger, it sees its definition of dbgMemRange.

The same project compiles well under Linux and Win32. Any ideas?

Stephano

Reply by email

Mattias Gaertner
to patspiper
Hi, SQLDB package uses codetools,

As far as I can see SQLDB is a designtime package. It registers property editors in the IDE. You don't need its type should be changed, so that the IDE does not compile it into projects.

Show quoted text 18 lines
and thus whenever it is included in a WinCE project the following error pops up upon compilation: .../lazarus-svn/components/codetools/fileprocs.pas(287,10) Error: Forward declaration not solved "dbgMemRange(PByte;LongInt;LongInt="0"):AnsiString;" dbgMemRange is defined in: - lclproc.pas - LazLoggerIntf.inc - fileprocs.pas LazLoggerIntf.inc is included in lazlogger.pas, lazloggerdummy.pas and lozloggerbase.pas. As FileProcs uses LazLogger, it sees its definition of dbgMemRange. The same project compiles well under Linux and Win32. Any ideas?

Sounds like a compiler bug.

I changed a few implementations to redirect to the LazLogger functions. Please test.

Mattias

Reply by email

Martin Frb
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
> and thus whenever it is included in a > WinCE project the following error pops up upon compilation: > > .../lazarus-svn/components/codetools/fileprocs.pas(287,10) Error: > Forward declaration not solved > "dbgMemRange(PByte;LongInt;LongInt="0"):AnsiString;" > > dbgMemRange is defined in: > - lclproc.pas > - LazLoggerIntf.inc > - fileprocs.pas > > LazLoggerIntf.inc is included in lazlogger.pas, lazloggerdummy.pas and > lozloggerbase.pas. > > As FileProcs uses LazLogger, it sees its definition of dbgMemRange. > > The same project compiles well under Linux and Win32. Any ideas? Sounds like a compiler bug. I changed a few implementations to redirect to the LazLogger functions. Please test.

My guess would have been that PByte (more likely than integer) was redefined in something in the "uses" in implementation.

Reply by email

patspiper
to Mattias Gaertner: On Sat, 26 Apr 2014 12:25:45 +0300 As far as I can see SQLDB is a designtime package. It…
Mattias Gaertner wrote
As far as I can see SQLDB is a designtime package. It registers property editors in the IDE. You don't need 't the runtime components defined in unit sqldb? Maybe its type should be changed, so that the IDE does not compile it into projects.

I tried to split the package into two, a design time one and a runtime one. The IDE built ok, but upon startup, I got a confusing error: Package: "SQLDBLaz 1.0.1"
lpk file: ".../lazarus-svn/components/sqldb/sqldblaz.lpk" Unit Name: "sqldb"

Unit "sqldb" was not found in the lpk file.
Probably this lpk file was not used for building this IDE. Or the package misuses the procedure RegisterUnit.

Can you give it a try?

> The same project compiles well under Linux and Win32. Any ideas? Sounds like a compiler bug.

This is not the 1st time this particular error in that same place/function, due to a redefinition of PByte in the implementation section.

Note: Just saw right now Martin's post.

I changed a few implementations to redirect to the LazLogger functions. Please test.

Thanks, but this didn't solve the issue.

Stephano

Reply by email

patspiper
to patspiper
patspiper wrote 10 lines
> >> The same project compiles well under Linux and Win32. Any ideas? > Sounds like a compiler bug. This is not the 1st time this particular error in that same place/function, due to a redefinition of PByte in the implementation section. Note: Just saw right now Martin's post.

Moving the windows unit in FileProcs from implementation to the top of the interface section resolved the issue. It seems there is a redundant definition there but only for WinCE.

Stephano

Reply by email