public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Building C++ application for eCos on ARM
@ 2013-08-29 14:33 Jabran Bhatti
  2013-08-29 16:13 ` [ECOS] " John Dallaway
  0 siblings, 1 reply; 8+ messages in thread
From: Jabran Bhatti @ 2013-08-29 14:33 UTC (permalink / raw)
  To: ecos-discuss

Hello,

I'm looking to build a C++ application for eCos on an ARM processor.
My program requires several standard C++ header files such as vector,
iostream, list, ...

My question is: how can I achieve this? Does anyone have any
experience building and deploying C++ applications for eCos?



When I use the arm-eabi-g++ compiler to compile the application, I get
the following error

fatal error: vector: No such file or directory

meaning that the C++ vector library is not present.

However, the arm-none-eabi-g++ compiler does include these standard
header files. I do get the following errors for '<iostream>':

========================================
In file included from
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/bits/locale_facets.h:43:0,
                 from
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/bits/basic_ios.h:39,
                 from
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/ios:45,
                 from
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/ostream:40,
                 from
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/iostream:40,

/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:44:35:
error: '_U' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:45:32:
error: '_L' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:46:32:
error: '_U' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:46:37:
error: '_L' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:47:32:
error: '_N' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:48:33:
error: '_X' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:48:38:
error: '_N' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:49:32:
error: '_S' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:50:32:
error: '_P' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:50:37:
error: '_U' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:50:42:
error: '_L' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:50:47:
error: '_N' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:50:52:
error: '_B' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:51:32:
error: '_P' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:51:37:
error: '_U' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:51:42:
error: '_L' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:51:47:
error: '_N' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:52:32:
error: '_C' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:53:32:
error: '_P' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:54:32:
error: '_U' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:54:37:
error: '_L' was not declared in this scope
/opt/arm-2010.09/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/c++/4.5.1/arm-none-eabi/bits/ctype_base.h:54:42:
error: '_N' was not declared in this scope

======================================

Can I use the arm-none-eabi-g++ compiler for eCos? If yes, how do I
solve these errors? If no, what should I do?

Many thanks in advance!

-- 
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] 8+ messages in thread
* [ECOS] Re: Building C++ application for eCos on ARM
@ 2013-09-17 14:41 cetoni GmbH - Uwe Kindler
  2013-09-18 13:18 ` Jabran Bhatti
  0 siblings, 1 reply; 8+ messages in thread
From: cetoni GmbH - Uwe Kindler @ 2013-09-17 14:41 UTC (permalink / raw)
  To: ecos-discuss, jabran.tlv

Hi,

we also had an own library that uses stl and we managed to build it for 
eCos uSTL. We did the following

1.
We created an stl compatibility layer: a folder that contains the stl 
include files for eCos:
vector
string
map
...

2.
Each of these include files contains the same content - it simply 
includes ustl_compat.h file

#ifndef ustl_compat_vectorH
#define ustl_compat_vectorH
#include "ustl_compat.h"

#endif

3.
The ustl_compat.h file contains the following code:

#ifndef ustl_compatH
#define ustl_compatH
#include <ustl.h>

#define std ustl

#endif // ustl_compatH


So it simply includes the ustl.h header file and defines the 
preprocessor macro std. So each occurence of std::vector will be 
replaced by ustl::vector

This worked for us and we could compile the library.






-- 
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] 8+ messages in thread

end of thread, other threads:[~2013-09-18 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-29 14:33 [ECOS] Building C++ application for eCos on ARM Jabran Bhatti
2013-08-29 16:13 ` [ECOS] " John Dallaway
2013-09-02 14:18   ` Jabran Bhatti
2013-09-10 19:13     ` Jabran Bhatti
2013-09-11  8:03       ` John Dallaway
2013-09-17 14:41 cetoni GmbH - Uwe Kindler
2013-09-18 13:18 ` Jabran Bhatti
2013-09-18 17:14   ` Uwe Kindler

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).