public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: cetoni GmbH - Uwe Kindler <uwe.kindler@cetoni.de>
To: ecos-discuss@sourceware.org, jabran.tlv@gmail.com
Subject: [ECOS] Re: Building C++ application for eCos on ARM
Date: Tue, 17 Sep 2013 14:41:00 -0000	[thread overview]
Message-ID: <5238697B.4090205@cetoni.de> (raw)

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

             reply	other threads:[~2013-09-17 14:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 14:41 cetoni GmbH - Uwe Kindler [this message]
2013-09-18 13:18 ` Jabran Bhatti
2013-09-18 17:14   ` Uwe Kindler
  -- strict thread matches above, loose matches on Subject: below --
2013-08-29 14:33 [ECOS] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5238697B.4090205@cetoni.de \
    --to=uwe.kindler@cetoni.de \
    --cc=ecos-discuss@sourceware.org \
    --cc=jabran.tlv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).