This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: linking problem.
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: jameshq at liverpool dot ac dot uk
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 20 Nov 2002 01:48:11 -0700
- Subject: Re: [ECOS] linking problem.
- References: <200211192216.gAJMGZb05498@webmail2.liv.ac.uk>
On Tue, 2002-11-19 at 15:16, jameshq@liverpool.ac.uk wrote:
> Hi all:
> I wrote a additional file call hal_aux.c in the /hal/ directory and
> set it compiled in the *.cdl file.
>
> hal_aux.c
>
> void testfun(void)
> {
> cyg_uint32 a = 1000;
>
> }
>
>
> and when I call testfun() in the kapi.cxx file inside
> cyg_thread_create() as:
>
> in kapi.cxx file
>
> extern void testfun(void);
> cyg_thread_create(xxx)
> {
> xxx
> testfun();
> xxx
> }
>
> I can build the ecos library without problem, but when I try to
> compile the user programe and link with the ecos library it generates
> a error says the testfun is not defined. so how can I solve it problem
> thanks a lot.
Try 'externC void testfun(void);'
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss