Skip to content

D10.2.3 compile error #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
limelect opened this issue Jun 2, 2020 · 4 comments
Closed

D10.2.3 compile error #5

limelect opened this issue Jun 2, 2020 · 4 comments
Assignees
Labels
not an error It's not a bug, it's a feature! rejected Won't implement or fix

Comments

@limelect
Copy link

limelect commented Jun 2, 2020

  1. IntfExternalObj.pas included in the project had to delete since it does not exist.
  2. In ActiveText.UMain.pas line 556 Result := Create;
    error :[dcc32 Error] ActiveText.UMain.pas(556): E2382 Cannot call constructors using instance variables
    No knowledge of more errors since the compiler stop.
    Downloaded codesnip-develop
@delphidabbler
Copy link
Owner

delphidabbler commented Jun 7, 2020

Have you run Make? If not you need to do

> Make config
> Make resources
> Make typelib
> Make autogen

before compiling from the IDE. IntfExternalObj.pas is generated automatically.

Note though that the above won't run unless you have the correct tools installed and configured, Build.html explains what you need.

Whether the second error is related I don't know - it may go away when the first problem is fixed, but somehow I doubt it! Not sure why that's happening yet.

Sorry for the delay -- things are a bit frantic getting the website redesigned and moved. Two days to go ....!

@delphidabbler
Copy link
Owner

Re the error in ActiveText.UMain.pas.

This is only a guess, but I'm wondering if D10.2.3 (or some earlier version) changed the syntax to prevent calling constructors from instances. It was allowed in XE, but maybe not later. A change to

function TActiveText.Clone: IInterface;
begin
  Result := TActiveText.Create;
  (Result as IAssignable).Assign(Self);
end;

Might do the trick. And similarly anywhere else this happens. The only time it could be problematic is if the class where the constructor is called is a sub-class. Then a different solution would be needed.

@limelect
Copy link
Author

limelect commented Jun 8, 2020

With all due respect, I do not understand why I cannot compile?
As simple as that.
Why do I need all this, Build.html, procedure?
If so I will keep using the old program. It works for me.

@delphidabbler
Copy link
Owner

🤔 Just wondering if there's some misunderstanding between us here?

You said:

"If so I will keep using the old program. It works for me."

Now, the old program (providing you mean CodeSnip), wouldn't compile either without running Make, which got me wondering whether all you want to do is run the program?

If you do then you're right, there's no need for this. Just download one of the pre-compiled versions from the releases tab and either follow the links to SourceForge or use the dd-codesnip.zip or dd-codesnip-portable.zip links in the assets section. You're just going to have to install the program using a standard installer (or copy files manually for the portable version).

But, if you do want to develop / modify the code, then it is what it is!

There's no way round the need for the makefile. I've tried to get Delphi to run the make from the IDE, but to no success. I think it can be done, but it's just easier for me to shell out and run it from the command line.
I'd just observe that its not unusual for non-trivial programs to require the use of Makefiles.

And I'm not sure the code will compile on anything but Delphi XE - its a long story why I stuck to XE for CodeSnip!!

@delphidabbler delphidabbler self-assigned this Jun 8, 2020
@delphidabbler delphidabbler added rejected Won't implement or fix not an error It's not a bug, it's a feature! labels May 23, 2023
@github-project-automation github-project-automation bot moved this to Considering in CodeSnip May 23, 2023
@delphidabbler delphidabbler moved this from Considering to Rejected in CodeSnip May 23, 2023
@delphidabbler delphidabbler removed this from CodeSnip Jun 18, 2023
@delphidabbler delphidabbler reopened this Apr 15, 2025
@delphidabbler delphidabbler closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2025
@delphidabbler delphidabbler reopened this Apr 15, 2025
@delphidabbler delphidabbler closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not an error It's not a bug, it's a feature! rejected Won't implement or fix
Projects
None yet
Development

No branches or pull requests

2 participants