-3

IMPORTANT UPDATE: The question is about the framework binaries, which the dialog below mentions, and not about the dialog at all.

When I create an empty service application in Delphi, it warns me that linkage to framework binaries will have to be handled manually then.

I tried to google what these framework binaries are, but found nothing valuable except questions about what the dialog is.

Does anybody know what are these binaries, where they are, and how can I link to them manually?

Here is the text of the dialog:

---------------------------
Confirm
---------------------------
Unit "Unit6.pas" references the "Visual Component Library" framework, but the project currently has no framework assigned. Do you want to enable the "Visual Component Library" framework for this project?

(Not enabling the proper framework may require unit scoping, ambiguities, and linkage to framework binaries to be handled manually)
---------------------------
Yes   No   Cancel   
---------------------------
Serhii Kheilyk
  • 933
  • 1
  • 8
  • 24

2 Answers2

1

When you create a new project, you have to choose whether to use VCL or FireMonkey in it, or neither.

A Windows Service Application requires VCL, but your project does not have VCL enabled, so it will not link in the VCL library into your service's EXE correctly. That is what the IDE is warning you about.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • I know this. My question is about the **binaries** – Serhii Kheilyk Jun 11 '18 at 14:39
  • 1
    I don't think that the question really is about the binaries. I think you are misinterpreting a slightly misleading message. A default Windows service app is self-contained. It doesn't need to be linked to anything. Set the framework type to VCL and there is nothing more to do. – David Heffernan Jun 11 '18 at 14:53
  • @DavidHeffernan, what makes you think so? – Serhii Kheilyk Jun 11 '18 at 14:54
  • 1
    *Unit "Unit6.pas" references the "Visual Component Library" framework, but the project currently has no framework assigned.* – David Heffernan Jun 11 '18 at 14:55
  • @DavidHeffernan So you think there are no any such binaries? Nor the way to link to them manually? – Serhii Kheilyk Jun 11 '18 at 14:55
  • 1
    Nope. So, what is `FrameworkType` set to in your dproj file? – David Heffernan Jun 11 '18 at 14:56
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/172900/discussion-between-serhii-kheilyk-and-david-heffernan). – Serhii Kheilyk Jun 11 '18 at 14:59
  • Telling me what my question is about and denying my tries to defend my point seem very strange to me. – Serhii Kheilyk Jun 11 '18 at 15:13
  • 1
    What is frustrating is that you won't just set the FrameworkType to VCL. – David Heffernan Jun 11 '18 at 15:23
  • @DavidHeffernan, but my question was not about the dialog and what to do with it. I wanted to know *what the framework binaries are*. – Serhii Kheilyk Jun 11 '18 at 15:26
  • 1
    Probably something to do with other frameworks. It seems like a misleading message. If you would just set the FrameworkType to VCL and see what happens we might be able to confirm that this is what is triggering the message. Which would be useful information. Anyway, you seem only to care about linking to these binaries. When you find them link to them and be happy. – David Heffernan Jun 11 '18 at 15:29
  • 2
    @SerhiiKheilyk The message is referring to the VCL's own packages (`rtl`, `vcl`, etc), which may be compiled statically into the final executable, or linked to dynamically so they are loaded at runtime from external `BPL` files. – Remy Lebeau Jun 11 '18 at 19:55
  • I don't think the framework type influences runtime packages at all. – David Heffernan Jun 11 '18 at 21:33
  • 2
    @DavidHeffernan Of course it does. Other than the base `rtl` package, VCL uses different runtime packages than FMX does. – Remy Lebeau Jun 11 '18 at 22:02
  • I know that. I mean the framework type setting in the dproj file. I don't think that changing it will lead to different runtime packages being linked. The runtime packages are determined by another setting. – David Heffernan Jun 12 '18 at 06:05
1

This dialog appears to be misleading. For a Windows service application, there are no framework binaries to be linked.

When you create your Windows service application you should select Yes when this dialog is shown, and the FrameworkType will be set to VCL. At this point you are good to go. You can build your service application and the generated executable file is self-contained. It can be deployed directly and has no further dependencies.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490