Sign in Join

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

Mailing lists / fpc-devel / 2005-02

Classes and cthreads

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Pedro Lopez-Cabanillas

Hi,

On current CVS (FPC-1.9.9) there is a dependency between classes unit and cthreads. Any program using the classes unit requires to use also cthreads or it fails with a runtime error. This happens to the utilities fpcmake and fpdoc.

$ ./fpdoc
This binary has no thread support compiled in.
Recompile the application with a thread-driver in the program uses clause before other units using thread.
Runtime error 232 at $08058667
$08058667
$08058813
$080584F5
$0807992A
$0807F9A0
$08055285
$08049976

Regards,
Pedro

Reply by email

Florian Klaempfl
to Pedro Lopez-Cabanillas: This is not exact. Even if I use also the unit cthreads, the programs fail with the same…
Pedro Lopez-Cabanillas wrote 10 lines
On Saturday 26 February 2005 12:02, I wrote: >On current CVS (FPC-1.9.9) there is a dependency between classes unit and >cthreads. Any program using the classes unit requires to use also cthreads >or it fails with a runtime error. This happens to the utilities fpcmake and >fpdoc. This is not exact. Even if I use also the unit cthreads, the programs fail with the same runtime error. This is on Linux.

cthreads must be one of the first units in the uses clause.

Reply by email

Pedro Lopez-Cabanillas
to Pedro Lopez-Cabanillas: On current CVS (FPC-1.9.9) there is a dependency between classes unit and cthreads. Any…
On current CVS (FPC-1.9.9) there is a dependency between classes unit and cthreads. Any program using the classes unit requires to use also cthreads or it fails with a runtime error. This happens to the utilities fpcmake and fpdoc.

This is not exact. Even if I use also the unit cthreads, the programs fail with the same runtime error. This is on Linux.

Regards,
Pedro

Reply by email

Pedro Lopez-Cabanillas
to Florian Klaempfl: cthreads must be one of the first units in the uses clause.
Florian Klaempfl wrote 10 lines
> On Saturday 26 February 2005 12:02, I wrote: >>On current CVS (FPC-1.9.9) there is a dependency between classes unit and >>cthreads. Any program using the classes unit requires to use also >> cthreads or it fails with a runtime error. This happens to the utilities >> fpcmake and fpdoc. > > This is not exact. Even if I use also the unit cthreads, the programs > fail with the same runtime error. This is on Linux. cthreads must be one of the first units in the uses clause.

Aha! Yes.

This program works:
	program ok;
	uses cthreads, Classes;
	begin
	  WriteLn('Hello');
	end.
And this one fails:
	program f1;
	uses Classes, cthreads;
	begin
	  WriteLn('Hello');
	end.
And this one also fails:
	program f2;
	uses Classes;
	begin
	  WriteLn('Hello');
	end.

Regards,
Pedro

Reply by email