[ECOS] Re: simple question..

Jonathan Larmour jifl@eCosCentric.com
Wed Jun 23 13:26:00 GMT 2004


YHChou@viatech.com wrote:
> 
> 
> Hi,
> 
>    I have created one header file and two c file as below,
> 
> test.h
> int add(int a, int b);
> 
> test1.c
> #include "test.h"
> int add(int a, int b)
> {
>    return a + b;
> }
> 
> test2.c
> #include "test.h"
> void sample(void)
> {
>    int i;
>     i = add(3, 4);
> }
> 
> I create test1.o and test2.o first. but I can create not the execution 
> file. the function can not
> be linked together.. what is the problem?

You need an entry point like main() probably.

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


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



More information about the Ecos-discuss mailing list