C++ for Ångström beagleboard

i have a question:
i have install on my beagleboard linux-Ångström.
so far so good and it works very good.
I would like now to write some c++ programs like i do in windows.
i am really new in Ångström...so if someone can tell me the
following :
what is the best programs i need to install for writing a program in c
++?
and if you can guide me to a tutorial.....how to write my first "hello
world" in that program(and how to install the program in Ångström on
my beagleboard)

Thanks in advance !!

if angstrom has a package manager of some sort, you can use GCC G++, which
is the GNU C++ compiler, i dont know if angstrom has an IDE or not, it
might have code blocks but im not too sure

Its the same as writing a c++ program for any other linux platform,
just use the cross compiler to compile it.
Jesse

Everyday we compile c++ program on the Beagle Board with Angstrom distribution. We have no issue, everything works well. We use g++ compiler.

2009/7/28 Jesse <jbonzo@gmail.com>

ok....but can you direct me to a tutorial for how to use this cross
compiler?

From: beagleboard@googlegroups.com
[mailto:beagleboard@googlegroups.com] On Behalf Of Razvan Craciunescu
Sent: Saturday, August 01, 2009 4:39 AM
To: Beagle Board
Subject: [beagleboard] Re: C++ for Ångström beagleboard

ok....but can you direct me to a tutorial for how to use this cross
compiler?

All you need to do is have the path to your cross compiler in your path. If
you are using OE, put the location of your OE tmp/cross/armv7a/bin in your
path. To compile, use arm-angstrom-linux-gnueabi-gcc to compile your code.
If you are using CodeSourcery, put the location of Sourcery_G++/bin in your
path and use arm-none-linux-gnueabi-gcc. If you are using a makefile, set
CROSS_COMPILE to either arm-angstrom-linux-gnueabi-gcc or
arm-none-linux-gnueabi-gcc.

I hope this helps.

Kind Regards
John

> Its the same as writing ac++program for any other linux platform,
> just use the cross compiler to compile it.
> Jesse
>
>
> > if angstrom has a package manager of some sort, you can use GCC G++,
which
> > is the GNUC++compiler, i dont know if angstrom has an IDE or not, it
> > might have code blocks but im not too sure
>
>
> > > i have a question:
> > > i have install on my beagleboard linux-Ångström.
> > > so far so good and it works very good.
> > > I would like now to write somec++programs like i do in windows.
> > > i am really new in Ångström...so if someone can tell me the
> > > following :
> > > what is the best programs i need to install for writing a program

in c

> > > ++?
> > > and if you can guide me to a tutorial.....how to write my first

"hello

In my Angstrom, there is just some bin files like arm-angstrom-linux-
gnueabi-cpp, but no xxxx-gcc.
after downloading cross compiler from Codesourcery, when i type "arm-
none-eabi-gcc ", always display the error "line 1: syntax error: "("
unexpected". What's wrong with it? Where can i download the compiler
like "arm-angstrom-linux-gnueabi-xxx" ? Please help.

Rickey

I've posted it multiple times last week, but it seems I'm not getting through:

If you're developing for angstrom DO NOT use the code sourcery toolchain, it being compatible with angstrom is luck, not something to rely on. If you want to crosscompile your app, install OE (go to the angstrom website, click 'developers' and follow the instructions), or do native development.

regards,

Koen

From: beagleboard@googlegroups.com
[mailto:beagleboard@googlegroups.com] On Behalf Of DotDotDog
Sent: Monday, August 03, 2009 12:59 AM
To: Beagle Board
Subject: [beagleboard] Re: C++ for Ångström beagleboard

In my Angstrom, there is just some bin files like arm-angstrom-linux-
gnueabi-cpp, but no xxxx-gcc.

What recipe did you build in Angstrom? I normally do "bitbake
beagleboard-demo-image" and when it is done, I see all the compilers in
oe/tmp/cross/armv7a/bin. For example, I see arm-angstrom-linux-gnueabi-gcc
in the bin folder.

after downloading cross compiler from Codesourcery, when i type "arm-
none-eabi-gcc ", always display the error "line 1: syntax error: "("
unexpected". What's wrong with it? Where can i download the compiler
like "arm-angstrom-linux-gnueabi-xxx" ? Please help.

The command should have been arm-none-linux-gnueabi-gcc. If you are using
Linux, to avoid mistakes like this, type arm- and then press the tab key
twice, and then type gcc.

arm-<TAB><TAG>
will show the following if your path is setup correctly:
arm-none-linux-gnueabi-
or
arm-angstrom-linux-gnueabi-
depending on whether you have the CodeSourcery compiler or Angstrom tools in
your path.

If you are developing code to run on Angstrom, you should use the Angstrom
compiler as there are some compatibility issues with the CodeSourcery
compiler and Angstrom.

When using the Ubuntu filesystem, I use CodeSourcery. If you want an IDE,
you have to pay for the personal edition of CodeSourcery. The LITE version
of CodeSourcery does not have an IDE.

Rickey

> > From: beagleboard@googlegroups.com
> > [mailto:beagleboard@googlegroups.com] On Behalf Of Razvan Craciunescu
> > Sent: Saturday, August 01, 2009 4:39 AM
> > To: Beagle Board
> > Subject: [beagleboard] Re: C++ for Ångström beagleboard
>
> > ok....but can you direct me to a tutorial for how to use this cross
> > compiler?
>
> All you need to do is have the path to your cross compiler in your path.

If

> you are using OE, put the location of your OE tmp/cross/armv7a/bin in

your

> path. To compile, use arm-angstrom-linux-gnueabi-gcc to compile your

code.

> If you are using CodeSourcery, put the location of Sourcery_G++/bin in

your

> path and use arm-none-linux-gnueabi-gcc. If you are using a makefile,

set

> CROSS_COMPILE to either arm-angstrom-linux-gnueabi-gcc or
> arm-none-linux-gnueabi-gcc.
>
> I hope this helps.
>
> Kind Regards
> John
>
>
>
> > > Its the same as writing ac++program for any other linux platform,
> > > just use the cross compiler to compile it.
> > > Jesse
>
>
> > > > if angstrom has a package manager of some sort, you can use GCC

G++,

> > which
> > > > is the GNUC++compiler, i dont know if angstrom has an IDE or not,

it

> > > > might have code blocks but im not too sure
>
>
> > > > > i have a question:
> > > > > i have install on my beagleboard linux-Ångström.
> > > > > so far so good and it works very good.
> > > > > I would like now to write somec++programs like i do in windows.
> > > > > i am really new in Ångström...so if someone can tell me the
> > > > > following :
> > > > > what is the best programs i need to install for writing a

program

> in c
> > > > > ++?
> > > > > and if you can guide me to a tutorial.....how to write my first
> "hello
> > > > > world" in that program(and how to install the program in

Ångström on

From: beagleboard@googlegroups.com
[mailto:beagleboard@googlegroups.com] On Behalf Of Koen Kooi
Sent: Monday, August 03, 2009 4:59 AM
To: beagleboard@googlegroups.com
Subject: [beagleboard] Re: C++ for Ångström beagleboard

>
>
> In my Angstrom, there is just some bin files like arm-angstrom-linux-
> gnueabi-cpp, but no xxxx-gcc.
> after downloading cross compiler from Codesourcery, when i type "arm-
> none-eabi-gcc ", always display the error "line 1: syntax error: "("
> unexpected". What's wrong with it? Where can i download the compiler
> like "arm-angstrom-linux-gnueabi-xxx" ? Please help.

I've posted it multiple times last week, but it seems I'm not getting
through:

Koen, you make me laugh. I recall you suggesting to Gerald about using
flashing HTML because he had to repeat himself over and over again. Anyway,
maybe I have a suggestion that will lower your blood pressure. Why not
include a link to an FAQ as part of the mailing list signature. A little
explanation or reference as to why these compilers are not guaranteed to be
compatible will also be helpful.

Finally, this doesn't get said as often as it should. Thank you for all your
hard work and all that you contribute to the BeagleBoard community.

Kind Regards
John

If you're developing for angstrom DO NOT use the code sourcery toolchain,

it

being compatible with angstrom is luck, not something to rely on. If you

want to

crosscompile your app, install OE (go to the angstrom website, click

'developers'

Koen Kooi <koen@beagleboard.org> writes:

What i mean is to develop a c++ application directly on BB under
Angstrom. Actually along with QT embedded 4.5.2. I want to clarify if
I can compile on BB directly. Thx for your comments. May I ask you
development environment on BB?

What i mean is to develop a c++ application directly on BB under
Angstrom. Actually along with QT embedded 4.5.2. I want to clarify if
I can compile on BB directly. Thx for your comments. May I ask you
development environment on BB?

installing task-native-sdk will get a number of the tools installed.
You'll also need to install the qt dev packages. I'm not sure what
they are.

Philip

The main problem is people won't use the same CFLAGS when switching compilers (be it by omitting them or because the builtin defaults have changed) and will have subtly different ABIs that link, but mysteriously segfault at runtime.
The second problem is that people mixing CSL with angstrom will be using different gcc and glibc versions than installed on the system which also leads to trouble. And the third problem is that generally people have no clue about crosscompiling and just use whatever has a windows installer or pretty GUI.

Once you were in the situation where you hear someone saying "if we mix csl2007 and csl2006 it works in qemu, but crashes on real hardware, fix it" you never ever want to have people mix toolchains again. Unless they really know what they are doing, which isn't the case for 99% of the people.

regards,

Koen

ok...i have read all of this but can anyone tell me step by step(or
where i can find) how to do all of this?
tanks!

I followed the procedure on the Angstrom website for the OE
installation. However,
there is error msg "Please set the PERSISTEN_DIR or CACHE variable"
when i do
"bitbake beagleimage". Thanks for any clues.

Rgds,
Eric

Step 3, first command:
source source-me.txt

Don't skip that :slight_smile:

Yes, I have done this step. And the variables set in the source-me.txt
is correct..
Anything else i can check?
P.S. it is done under Ubuntu 9.XX