Forum > Packages and Libraries

install a package depending on another package

(1/3) > >>

kuvali:
I have a package, which depends on the sources of another package. I can compile the first, if I add the folder with the source files of the second package to the other unit files in the compiler options of the first package. But that's not the correct way, because a second set of the ppu-files of the second components is created then. After rebuilding lazarus I get errors like: unit ... exists twice and unable to find file ...

Instead I have to use the existing ppu-files. But I could not manage this. Please can you tell me, how I have to change the package options of the first package correctly?

Thank you!

taazz:
You have to make sure that the first package is in the required list of the second package, and to do that you need to add it using the big plus button on the package display form.

kuvali:
Now I get the message: the package has already a dependency for the second package and indeed I can find the item in the lpk-file. I guess, that I still have to add a path somewhere in the options.

Thank you for the quick answer

taazz:
Open the second package using the menu "package\open package", in the window that appears scroll down until you find the required packages node, does the first package name appears in there? If not then add it using the big plus button on the same window do not rely on the existanse of the package in the lpk only.

Make sure that you do not have any circular references eg package1 requires package2 and package2 requires package1 those requirements must be in one way ee package2 requires package1 only.
If everything has been set correctly the the path to the compiled units of package one should be accessible by package2.

kuvali:
>Open the second package
>does the first package name appears in there? If not then add it

Sorry, I guess, my terminology was not clear. The first package depends on the second. So the first is not required by the second and indeed, it is not in the required packages node there.

>Make sure that you do not have any circular references

There aren't circular references. the second package appears in the requirements of the first, but not the other way round.

>the path to the compiled units of package one should be accessible by package2.

In my terminology:
the path to the compiled units of package two should be accessible by package one.

Unfortunately, this is not the case. When I try to compile the package one, source files of package two cannot be found, though package two belongs to the requirements of package one.

Do you have any more ideas?

Navigation

[0] Message Index

[#] Next page

Go to full version