C compiler in angstrom

So I have gotten the c++ compiler to work in angstrom 2.6.28 I was
wondering if anyone knows how to get a C compiler to work? It seems
that I am going to need to use c++ for some stuff and c for other
stuff. Let me know if anyone knows how to install a native version or
how to get access to the compiler if it is already on there.

Thanks!

If your C++ compiler is based on GCC (GNU Compiler Collection) then it
should already be a C compiler. According to the GCC manual (4.3.0),
the "gcc" command assumes ".c" files are C programs and ".cc", ".c++",
and ".C" are C++ programs. However, if you invoke GCC using the "g++"
command it assumes ".c" files are C++.

You can download the GCC docs from http://gcc.gnu.org/onlinedocs/.
They are excellent reference manuals IMO.

If your C++ compiler is something else, RTFM.

I am using the native g++ compiler in the angstrom image 2.6.28

I have tried to compile the files with gcc using the .c extension, but
then I get the error...

gcc: error trying to exec 'cc1': execvp: No such file or directory
root@beagleboard:/home/cpp#

If I use the .C extension the program will compile. but it seems that
it uses the c++ compiler.

So I guess I need to find a different compiler? or is there a special
syntax I need to use I am not sure.

Thanks for the help!

It looks like either the C compiler didn't get included in Ångström
image 2.6.28 or else "gcc" can't find it because PATH is screwed up.
It's hard to imagine that whoever created 2.6.28 included C++ but not
C. You might look around through the usual binary directories to see
if "cc1" is anywhere. Another helpful tool is to turn on the
"verbose" option "-v" when running both g++ and gcc so you get get a
better picture of what gcc is trying to do.

You might also try the IRC (BeagleBoard chat) as lots of the
BeagleBoard experts visit there.

I've never run gcc on the BeagleBoard itself.

Here's another suggestion for aero386 from TangHer@gmail.com that got
sent to my e-mail instead of to the group:

The package cpp fixed it for me.

opkg update; opkg install cpp