GCC propeller C on linux
TechSickoChevron
Posts: 20
in Propeller 1
I understand propware is a C++ library for the prop1 chip. I just want to use propeller C for programming. Is there any reason to not use propeller C than C++? I also had some difficulty installing Simple IDE so I figured I can try and use a different IDE.
Comments
I like C++. Lots of others like C. Obviously, "lots of others" are wrong.
That being said, PropWare's packages include the full suite of C libraries that Parallax maintains and distributes with SimpleIDE. You are not forced to use the PropWare C++ libraries in your code. But using the PropWare build system makes it easy to build and run your applications, and easy to link against the Simple Libraries outside of SimpleIDE (because Parallax do not provide static libraries nor a collection of headers for easy use in other build systems).
I've not heard that before. Can you expand on what you mean by this? Do you mean "use g++ to compile .c files" or "Name all files with a C++ extension, even if you only use C syntax"?
Yes, that. Mind you, there's some caveats. Notably, some C features aren't in C++. However, GCC tends to support them in C++ in some form, anyways, so all is well. (for example, C99's restrict keyword becomes __restrict__ in C++ and is a nonstandard extension).
The main advantage of using C++ instead of C is that you're using C++ instead of C and can thus use C++ features like member functions, templates, etc to the extent you deem fit.
The thing about the better error messages is hearsay, I haven't actually compared it myself, but I've heard it said a lot.
Compiling *.cpp files through the "gcc" command won't link the STL by default, so if you want to use certain C++ features, you need to either manually specify it or put the bare essentials somewhere in the project:
Which is exactly what PropWare's build system does for you