User Include Directory

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
dag
Newbie
Posts: 2
Joined: Fri Nov 09, 2007 5:20 pm

User Include Directory

Post by dag » Fri Nov 09, 2007 5:36 pm

I would like to have a directory contain additional shared source code which I would like to include in several different projects. Can you tell me what would be the preferred method to specify this kind of additional user include path? Is this possible from within RT-Druid or is it necessary to modify compile time scripts?

Thanks,
Dave

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:User Include Directory

Post by paolo.gai » Sun Nov 11, 2007 4:32 pm

Dear Dave,

Thanks for inquiring on the Library topic. The library support has been introduced in the last version of RT-Druid and EE. I just attach an example, trying to clearify the manuals which probably are not clear enough (I\'ll update them including these notes)

The idea we had is that third parties will need to add custom libraries to link to their code.

We thought at the best place where to put libraries, and for now we decided to store the libraries inside the \"contrib\" directory of the \"ee\" tree (as an example, the scicos directories are already there; on my PC, they stays under c:\\Programmi\\evidence\\ee\\contrib).

Then we have to address the following steps:

1) code and configuaration files of the libraries
---> Please take a look at the example attached (we will add it in the next distribution of Erika Enterprise). You have to copy it into the contrib directory. (Question: are the cfg.mk and libcfg.mk too complex?)

2) compilation of the libraries
---> Library compilation must be possible in two ways: A) once for all the applications. In that case, please instantiate the template application called \"All libraries\", and compile it. If you need to compile only a subset of the libraries, just use the OIL file at section 3.4.8 of the RT-Druid reference manual. B) library linked together with the application (see the OIL file of the template app in the following point)

3) inclusion of the libraries inside the application source code
--> Please take a look at the application example attached. The OIL file has two possible configurations: the first takes the library from a precompiled library in a \"libraries\" project; the library has to be compiled following instructions at point 2 (explained before); the second compiles the library on the fly.

If the support we have does not fit your needs, just give me an idea of what you need, or propose a better way to do it, so we can integrate it in the next version of the tools!

PJ
Attachments
library_example.zip
(20 KiB) Downloaded 321 times

dag
Newbie
Posts: 2
Joined: Fri Nov 09, 2007 5:20 pm

Re:User Include Directory

Post by dag » Mon Nov 12, 2007 5:46 pm

Paolo,

The description and example you sent work very nicely. I used it to create a shared library accessible from several projects and everything worked fine. The cfg.mk and libcfg.mk files are a little troublesome, but they are manageable because they will not be modified often. Can you tell me if it is possible to include two separate libraries in this way?

Thanks,
Dave

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:User Include Directory

Post by paolo.gai » Mon Nov 12, 2007 10:10 pm

Hi Dave,

We\'ll try to make the cfg.mk and libcfg.mk a little bit nicer in the next version (I have to think a little bit at how to simpify them leaving some freedom to the developer...)

... about the number of libraries...

The original idea was: 1) you can include how many libraries you want 2) ... just be sure to compile them and to include all them in the OIL file...

...but I think I just found a little \"missing feature\" in the OIL description file... which basically prevents to specify more than one library :-( I\'ll check it tomorrow, and I\'ll get back on you with some more info...

bye

PJ

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:User Include Directory

Post by paolo.gai » Tue Nov 13, 2007 9:42 am

Ok, just a quick reply to confirm that currently RT-Druid supports the inclusion of only one library (It was initially meant to support of course more than one, but somehow this missing feature slipped in the final version).

We will modify it, and in the next version it will be possible to include more than one library...

Sorry for the inconvenience,

bye

PJ

daniele.caprini
Newbie
Posts: 17
Joined: Thu Sep 04, 2008 4:30 pm

Re:User Include Directory

Post by daniele.caprini » Thu Nov 06, 2008 2:34 pm

Wrong 3d...:S
Attachments
file.zip
(20 KiB) Downloaded 288 times

Post Reply