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]

Re: compilation hello program error


On 04 Sep 2001 22:36:16 -0400, Hong Hsu wrote:
> 
>   As couldn't find FAQs of this eCos discuss,  I send the question to you.
> 
> I use Redhat Linux kernel 2.4.2 on Intel Pentuim 4.  For installation of 
> eCos,  the 
> /opt/ecos/ecos-1.3.1/tools/bin:/tools/H-i686-pc-linux-gnu/bin:$PATH
> is added to PATH, but I do not have /tools/h-i686-pc-linux-gnu/bin 
> directory.  what is supporse to be replaced by this?
> 
> Since I plan to use synthetic target, so I choose
> #ecosconfig new linux
> 
> at this stage what portion of ecos.ecc should be modified?
> 
> then I build tree:
> #ecosconfig tree
> 
> then I created a directory /root/hong/projects/ecos/ecos-work to hold 
> hello source code.
> #cd /root/projects/ecos/ecos-work
> 
> Copy Makefile and hello.c from /opt/ecos/ecos-1.3.1/examples/ to the 
> directory.  In Makefile, Change PKG_INSTALL_DIR to 
> /root/hong/projects/ecos/ecos-work/install 
> and uncomment XCC = i686-pc-linux-gnu-gcc
> 
> [root@cheetah <mailto:root@cheetah> ecos-work]# echo $BASE_DIR
> /root/hong/projects/ecos/
> 
> build hello generaged an error:
> 
> [root@cheetah <mailto:root@cheetah> ecos-work]# gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/ecos-work/install/lib -Ttarget.ld -nostdlib
> /usr/bin/ld: cannot open linker script file target.ld: No such file or directory
> collect2: ld returned 1 exit status
> 
> I notice that
> /root/hong/projects/ecos/ecos-work/install/lib  is empty
> 
> What is wrong with my procedure for building a hello program?     Your 
> help will be appreciated.
> 
> -Hong
> honghsu@bellatlantic.net <mailto:honghsu@bellatlantic.net>
> 
> 

Before you can build an application,you need to build the eCos kernel
library.  Do this in the directory you ran 'ecosconfig tree'in.  Simply
run 'make'in that directory.

Then you can try building your application.

Note: you might want to try using the "build_Makefile" script which
should be in the same directory as the sample 'hello.c' file.
> 



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