This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: simple question..
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: YHChou at viatech dot com
- Cc: eCos discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 23 Jun 2004 14:26:31 +0100
- Subject: [ECOS] Re: simple question..
- References: <927C3C2743098B4980CE31F77F35A842040AA6A5@exchfr01.viatech.com.fr>
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