After adding a package as a dependency on another project, reference problems persist

Asked

Viewed 1,283 times

3

Having created a package and soon after referencing it as a dependency on a project, which is in the same group of projects, I have problems trying to use the references of unit contained in the package. Even after dependency addition.

Even after compiling and having the package installed, the error continues.

How this is my project group structure and how I refer:

Estrutura de projetos

Here I mark the dependency:

Dependência marcada

I even navigated to the directory indicated by the image (C:\Users\Public\Documents\RadStudio\10.0\Bpl\) and there’s the file ORM.bpl.

But when trying to use the Unit s that would already be compiled in the package, I cannot:

biblioteca referenciada

That’s the mistake when trying to compile:

Erro ao tentar compilar

Whenever I needed to associate the libraries of other packages, even though I installed them in the Delphi IDE, I always needed to add to Unit in the project or in the folders searched by Delphi (Libraries).

Soon I ask if in this type of case the reference of dependencies does not help at all and then what the purpose of this reference?

Or else, of course, if I did or didn’t do something?

  • 3

    Longing to program in Delphi.

  • 4

    It’s over. I’m glad.

  • 1

    @Gypsy, Hehehe... I still can’t afford it! = D I still have many projects that I need to maintain, but the team where I work is changing and I’m getting some ASP.NET projects with C#, which already gives a happiness =D, things become possible without much suffering.

  • 2

    Oops, just one try, I’ll do better research at lunch break, but at Project -> Option -> Package -> Runtime Packages try adding your package there and see if it works without dcu’s. From what I’ve seen, you’d need a dcp as you can see at this link

  • @Caputo, soon when I have time, I test. Thanks for the tip.

  • @Caputo, I finally tested... Oo ... so even though you put the package in the package list as you suggested, and set the package settings to only Runtime (as indicated by the link) to not need installation in the IDE, it still hasn’t worked. I mean, he still claims he can’t find the library.

Show 1 more comment

1 answer

3

When you mark as dependency Delphi will only compile the ORM.bpl before it.

What you should do is add the DCP of the ORM package to Runtime packages. For that you enter in Options of your project and look for Runtime packages. Runtime packages

Remembering that if you are using a version Delphi XE or higher, one must pay attention to the Target.

An important thing, if you are trying to send to .bpl separate compiled file should mark the option Link with runtime packages as True.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.