Shared library

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
daniele.caprini

Shared library

Post by daniele.caprini »

Hi guys, there is a question for you.
I have 2 projects on Eclipse that use the same library. The library contain my functions.Now, for compile correctly I have one copy of this library in each project.
But I would like to use and modify only one file and import it into all my projects. What can I do?


ThankYou


/Daniele
chris

Re:Shared library

Post by chris »

Ok, the right way for this is to move your library in the contrib directory of the in the erika installation directory (typically is something link c:\\Evidence\\Evidence\\ee\\contrib).

You should create a new directory in contib with your library according to the make rules adopted by erika.
Look at the ieee802154 or scicos directories, that are two different libraries, and try to replicate the tree.

For further details, feel free to make any question.

Regards,
Chris.
daniele.caprini

Re:Shared library

Post by daniele.caprini »

Ehi guys,
I have try to build the entire tree, as described in this 3d :

http://www.evidence.eu.com/component/op ... atid,4/#16

but nothing works.
How can I do???
Is there another easy way to create a library shared between 2 different project????
Thankx

/daniele
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re:Shared library

Post by paolo.gai »

Hi Daniele,

please report at least what the compiler says, what you put in the OIL file... without that it\'s impossible to understand what is going wrong... saying \"nothi ng works\" does not help.

bye

PJ
daniele.caprini

Re:Shared library

Post by daniele.caprini »

Hi Paolo, I\'m sorry.

BTW, Today I have replicate the entire tree into contrib directory as Chris suggest me.
When I compile this is the result:

Code: Select all

C:\\Evidence\\Evidence\\bin\\mymake_cygwin.bat all 
MAKE_DIRECTORIES
CP p33FJ256MC710.h
GEN ee_pic30regs.h
DEP   eecfg.c
DEP   code.c
c:/WORKSP~1/TEST_S~1/code.c:48:22: provalib.h: No such file or directory
MAKE_DIRECTORIES (after a clean)
CPP   provalib.c
AR  libprovalib.a
CPP   eecfg.c
CPP   code.c
CP crt0.s 
CP p30f2010.inc 
ASM   crt0.s
LOC
CPP   ee_board.c
CP p33FJ256MC710.inc
GEN ee_pic30regs.inc
PRE   ee_hal.S
ASM   ee_hal.S
CPP   ee_hal_c.c
CPP   ee_alcancel.c
CPP   ee_altick.c
CPP   ee_alget.c
CPP   ee_alsetabs.c
CPP   ee_alsetrel.c
CPP   ee_irqsc.c
CPP   ee_rqexchg.c
CPP   ee_rqinsert.c
CPP   ee_schedule.c
CPP   ee_thact.c
CPP   ee_thendin.c
CPP   ee_mutex.c
AR  libee.a
LD
OBJDUMP
************************************

Compilation terminated successfully!
All work fine but Eclipse report an error on include line \"provalib.h\" into the code.c file.

The files attached are my code.c , conf.oil and the directory included in contrib.

I hope you can help me.
Thank you in advance.

Daniele
nino

Re:Shared library

Post by nino »

Some issues related with paths have been solved together with the \"C30 3.11b bug\".

Try using the patch that you can find here.

Nino
daniele.caprini

Re:Shared library

Post by daniele.caprini »

Hi @ all guys.
I have installed the new C compiler(3.11b student edition) with your patch but this don\'t resolve my problem.
Stefano Stella, another undergraduate student that work on Flex says that this problem isn\'t so important and the program works fine equally.

But now I have another problem, my license has less than 14 days remaining.Why this??I have download the student edition after sign in on Microchip web site.C&i

Thank you for any advice
Daniele
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re:Shared library

Post by paolo.gai »

This is normal... the C30 student edition has an evaluation period of 30 days, after that you need to register (I think it\'s free for students, or witha reduced price). If you do not register, optimizatios are disabled (but ERIKA works also with optimizations disabled...)

Ciao,

PJ
daniele.caprini

Re:Shared library

Post by daniele.caprini »

Ok Thankx Paolo.

Ciao
Locked