public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] arm-elf-g++ problem
@ 2007-06-07 18:18 John Macdonald
  2007-06-08  5:37 ` Andrew Lunn
  2007-06-08 10:59 ` Paul D. DeRocco
  0 siblings, 2 replies; 3+ messages in thread
From: John Macdonald @ 2007-06-07 18:18 UTC (permalink / raw)
  To: ecos-discuss

Hello,

I am trying to compile some software for the Atmel AT91 processor under
eCos. However, I am having trouble with my compiler. I built the arm-elf
toolchain using the instructions on the eCos website. I then used the
eCos configtool to configure eCos for the default Atmel evaluation board
(EB40). However, if I try to compile:

//#include <stdio.h>
#include <iostream>

int main()
{

//    printf("Hello\n\r");
    cout << "Hello\n";

}


Using the command:

arm-elf-g++ -I /home/johnm/ecos-work/arm_install/include test1.cpp -c


Then I get lots of errors. The included directory was produced by the
eCos configtool. The first block of errors are:

johnm@johnm-desktop:~/ecos_play$ arm-elf-g++
-I /home/johnm/ecos-work/arm_install/include test1.cpp -c
In file included
from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/arm-elf/bits/c
++io.h:35,

from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/bits/fpos.h:44,

from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/iosfwd:46,

from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/ios:44,

from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/ostream:45,

from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/iostream:45,
                 from test1.cpp:2:
/home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:129: `remove'
not
   declared
/home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:130: `rename'
not
   declared
/home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:137:
`tmpfile' not
   declared
/home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:138: `tmpnam'
not
   declared

If I comment out the C++ lines and comment in the C lines then an object
file is successfully produced. Does anyone know what is wrong here.

Regards,
John Macdonald


---------------------------------------------------------------------
This email has been scanned for Nautronix Plc, 
by the Postini Message Security System.
---------------------------------------------------------------------


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] arm-elf-g++ problem
  2007-06-07 18:18 [ECOS] arm-elf-g++ problem John Macdonald
@ 2007-06-08  5:37 ` Andrew Lunn
  2007-06-08 10:59 ` Paul D. DeRocco
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2007-06-08  5:37 UTC (permalink / raw)
  To: John Macdonald; +Cc: ecos-discuss

On Thu, Jun 07, 2007 at 02:15:13PM +0100, John Macdonald wrote:
> Hello,
> 
> I am trying to compile some software for the Atmel AT91 processor under
> eCos. However, I am having trouble with my compiler. I built the arm-elf
> toolchain using the instructions on the eCos website. I then used the
> eCos configtool to configure eCos for the default Atmel evaluation board
> (EB40). However, if I try to compile:
> 
> //#include <stdio.h>
> #include <iostream>
> 
> int main()
> {
> 
> //    printf("Hello\n\r");
>     cout << "Hello\n";
> 
> }
> 
> 
> Using the command:
> 
> arm-elf-g++ -I /home/johnm/ecos-work/arm_install/include test1.cpp -c
> 
> 
> Then I get lots of errors. The included directory was produced by the
> eCos configtool. The first block of errors are:
> 
> johnm@johnm-desktop:~/ecos_play$ arm-elf-g++
> -I /home/johnm/ecos-work/arm_install/include test1.cpp -c
> In file included
> from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/arm-elf/bits/c
> ++io.h:35,
> 
> from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/bits/fpos.h:44,
> 
> from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/iosfwd:46,
> 
> from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/ios:44,
> 
> from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/ostream:45,
> 
> from /home/johnm/ecos_toolchain/gnutools/arm-elf/include/iostream:45,
>                  from test1.cpp:2:
> /home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:129: `remove'
> not
>    declared
> /home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:130: `rename'
> not
>    declared
> /home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:137:
> `tmpfile' not
>    declared
> /home/johnm/ecos_toolchain/gnutools/arm-elf/include/cstdio:138: `tmpnam'
> not
>    declared
> 
> If I comment out the C++ lines and comment in the C lines then an object
> file is successfully produced. Does anyone know what is wrong here.

The C++ support for eCos is somewhat limited in anonymous
CVS. iostream is one of the things which do not work. Search the
archive for mor details.

If you want full c++ support, you probably want to license one of the
commercial forks of eCos, eg from eCosCentric.

      Andrew

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [ECOS] arm-elf-g++ problem
  2007-06-07 18:18 [ECOS] arm-elf-g++ problem John Macdonald
  2007-06-08  5:37 ` Andrew Lunn
@ 2007-06-08 10:59 ` Paul D. DeRocco
  1 sibling, 0 replies; 3+ messages in thread
From: Paul D. DeRocco @ 2007-06-08 10:59 UTC (permalink / raw)
  To: 'John Macdonald', ecos-discuss

> From: John Macdonald
> 
> I am trying to compile some software for the Atmel AT91 
> processor under eCos. However, I am having trouble with my 
> compiler. I built the arm-elf toolchain using the 
> instructions on the eCos website. I then used the eCos 
> configtool to configure eCos for the default Atmel evaluation 
> board (EB40). However, if I try to compile:
> 
> //#include <stdio.h>
> #include <iostream>
> 
> int main()
> {
> 
> //    printf("Hello\n\r");
>     cout << "Hello\n";
> 
> }

Add "using namespace std;".

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com 


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-07 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-07 18:18 [ECOS] arm-elf-g++ problem John Macdonald
2007-06-08  5:37 ` Andrew Lunn
2007-06-08 10:59 ` Paul D. DeRocco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).