Sign in Join

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

Mailing lists / fpc-pascal / 2002-05

Building Grafix under Win32

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Milos Pejovic

Hi all,

I do not manage to compile the Graphix 4.05 (4.02?) under Windows ME. I use win32 version 1.0.6 of the compiler. I have 64 Mb of RAM and 430 Mb of free space on my primary partition.

When it tries to compile the gxdd.pp, after a while I get the 'Out of memory' error,
and my hdd free space gets critically low, although I think that this amount of memory
ought be enough to build the 29kb file...

I also have trouble building the FreeType library - I get 50 errors of this kind:

ttinterp.pas(4395,30) Error: Incompatible types: got "<unknown type>" expected "
<procedure variable type of procedure(PSTORAGE);>"

I would really appreciate help,

Milos

Jonas Maebe
to Milos Pejovic
Milos Pejovic wrote 6 lines
When it tries to compile the gxdd.pp, after a while I get the 'Out of memory' error, and my hdd free space gets critically low, although I think that this amount of memory ought be enough to build the 29kb file...

This sounds like a bug in the compiler indeed. Try using -vl (or even -va), then you should see where this memory gobbling happens.

Show quoted text 9 lines
I also have trouble building the FreeType library - I get 50 errors of this kind: ttinterp.pas(4395,30) Error: Incompatible types: got "<unknown type>" expected " <procedure variable type of procedure(PSTORAGE);>" I would really appreciate help,

Try compiling it with the -Sd command line switch. In FPC, if you want to take the address of a procedure and you want to assign it to a procedure variable, you have to use "@procedure_name" instead of just "procedure_name" like in TP/Delphi. This check was broken in some places in previous versions of FPC however, causing inconsistent behaviour.

Jonas

Milos Pejovic
to Jonas Maebe

Hi,

Show quoted text 5 lines
Try compiling it with the -Sd command line switch. In FPC, if you want to take the address of a procedure and you want to assign it to a procedure variable, you have to use "@procedure_name" instead of just "procedure_name" like in TP/Delphi. This check was broken in some places in previous versions of FPC however, causing inconsistent behaviour.

This done the trick, even for the Graphix library, although it already had {$MODE OBJFPC}directive.
It all compiled nicely with the -Sd switch.

I'm keeping it for good in my fpc.cfg :))

Thanks Jonas,

Milos

Jonas Maebe
to Milos Pejovic
Milos Pejovic wrote
This done the trick, even for the Graphix library, although it already had {$MODE OBJFPC}directive.
{$mode objfpc} = -S2
{$mode delphi} = -Sd

Objfpc mode is normal FPC behaviour (which should not include consuming all memory on your system if an error is found :) with Delphi features such as classes, exceptions, rtti etc.

It all compiled nicely with the -Sd switch. I'm keeping it for good in my fpc.cfg :))

As long as you don't want to use any FPC features such as operator overloading, this should work fine.

Jonas