Hi all,
I have something you'll no doubt be able to help me with:
Goal: create a Class shared by a dozen or so projects (the Class provides the functionality to create reports in HTML format).
Question: how to accomplish this (I use the Harbor dialect). I see there are class templates, but they create DLL’s. Is there a way the class code can be pulled in at compile time?
Thanks folks,
Roland
Shared class library
Re: Shared class library
Hi Roland,
to have a class shared by several projects you have to create a DLL and to include it in the references of every application.
This library can be part of the same project as the executable or of a different project.
There are other, more advanced possibilities to share code, but they have some drawbacks and need much more attention.
Wolfgang
to have a class shared by several projects you have to create a DLL and to include it in the references of every application.
This library can be part of the same project as the executable or of a different project.
There are other, more advanced possibilities to share code, but they have some drawbacks and need much more attention.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Re: Shared class library
Hi Roland,
If the class consists of one or a few prg files it is not difficult, you just need to add the file in all of your apps/projects that need it, as a linked file. In order to do that in XIDE, when you add the file, just say "No" when asked to copy it to the app folder. I think Wolfgang refers to the complexity of making sure all your apps use the compiler options that this class requires, but I think that's manageable.
If the class consists of one or a few prg files it is not difficult, you just need to add the file in all of your apps/projects that need it, as a linked file. In order to do that in XIDE, when you add the file, just say "No" when asked to copy it to the app folder. I think Wolfgang refers to the complexity of making sure all your apps use the compiler options that this class requires, but I think that's manageable.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu