Forum > FV/Textmode IDE

Constructor must be init - how to get rid of this?

(1/2) > >>

I have a Linux console/framebuffer/non-x project so why using X and Lazarus to develop while I don't want any X to be there? I tried to move the project to fp

Then I got "Constructor name must be init" compiler error... and I didn't find where fp keeps fpc command line parameters to to change this behavior. Where I should search for this?

This is Raspberry Pi OS, 64-bit ARM.

i thinked what this error is for "Object" types only... anyway, this is next FPC option:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ----Ss        Constructor name must be init (destructor must be done)

Yes, I know, this is -Ss, but where fp keeps this so I can remove this option from there?


Either {$mode delphi} or {$mode objfpc} will solve the issue.
Other modes, like {$mode tp} or {$mode fpc}, the default, will trigger it. That's because in these modes the objpas unit is not loaded. That is documented.
It is a bit strange, since the objfpc unit pulls in classes, but old school objects do not need it, provided constructor /destructor are named init/done.


[0] Message Index

[#] Next page

Go to full version