This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
a question about removing file function in eCos programming
- From: Indra Antonius Simalango <indra at vlsi dot itb dot ac dot id>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 19 Jul 2005 21:46:17 +0700 (WIT)
- Subject: [ECOS] a question about removing file function in eCos programming
deal all,
Below are my quote snippet. It terminate previous page if page number
is non-zero and start next output page if page number is non-negative. If
page is -1 removes the most recently opened file. Returns 0 if OK, 2 on
errors.
-----------------------------------------------------------------------
int wrpage ( OFILE *f, int page )
{
int err=0 ;
err = nextopage ( f, page ) ;
if ( ! err && page == -1 ) {
if ( remove ( f->cfname ) ) {
err = msg ( "ES2can't delete file %s:", f->cfname ) ;
} else {
msg ( "Fremoved %s", f->cfname ) ;
}
}
return err ;
}
-----------------------------------------------------------------------
I've successfully compiled and linked it in linux, but I've found error
while linking it in eCos v2.0 with this error message :
file.o : In function 'wrpage' :
file.o(.text+0x69a):undefined reference to 'remove'
Is 'remove' function really undefined in eCos?
--
regards,
IndrA on 21:31, Jul 19
http://ic.ee.itb.ac.id/~antonius
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss