This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: linking problem.
- From: "Robert Cragie" <rcc at jennic dot com>
- To: <jameshq at liverpool dot ac dot uk>, "ECOS" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 20 Nov 2002 10:00:43 -0000
- Subject: RE: [ECOS] linking problem.
This could be C++ name mangling; try defining your function as:
extern "C" void testfun(void);
However, why are you changing cyg_thread_create() in kapi.cxx? If you are
just experimenting - fair enough, but this is an eCos repository file and
should not be changed unless you are planning to add something and submit it
as a patch (which, on the face of it, seems unlikely).
Robert Cragie, Design Engineer
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
http://www.jennic.com Tel: +44 (0) 114 281 2655
_______________________________________________________________
> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of
> jameshq@liverpool.ac.uk
> Sent: 19 November 2002 22:17
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] linking problem.
>
>
> 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.
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss