This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Inter-package visibility


Hi,
I defined  package of mine, but I cannnot use it inside other eCos
pre'existent ones.
I have:
 a configuration header: <pkgconf/mypkg.h>
a module header and relative source file:  mymodule.h and mymodule.c
inside I have only one function: void myfunction(void)
in mymodule.h i defined it as "extern" (I saw it done in some examples, like
errno.h/errno.c)

I all compiles fine: I tried to modify the hellowerld program and I an able
to call my function:

>/* this is a simple hello world program */
>#include <stdio.h>
>#include <mymodule.h>

>int main(void)
>{
>  printf("Hello, eCos world\n");
>  myfunction();
>  return 0;
>}

I then tried to use it inside the scheduler (my real goal) in the same way
(#include <mymodule.h> ) but it doesn't work! eCos compiles just fine but
when I try to use it to compile a HelloWorld it tells me:

>prove_conf_install//lib/libtarget.a(kernel_sched.o): In function `global
destructors keyed to 11000.cyg_scheduler_sched_lock':
>/ecos-c/cygwin/opt/ecos-2.0/packages/kernel/v2_0/src/sched/sched.cxx:104:
undefined reference to `myfunction(void)'
>collect2: ld returned 1 exit status
>make: *** [test_config] Error 1

What is the problem? Please help, I am completely blocked!

Thanks everyone,

Michele Portolan



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]