Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am working on embedded project that requires almost same kind of code template for each new implementation.
Instead of doing manual code, I am thinking to automate the code generation process.
So that I only need to provide input data to the tool in some format (could be any input format) and it generated C code according to it.
Open source would be the first choice but proprietary tools are also acceptable.
I already searched for Eclipse Modeling plugins Acceleo and Actifsource but didn't find them suitable for Embedded C code generation.
And I don't want to use heavy solution like MATLAB and LabVIEW just for code generation.
C code generation from UML models is possible with tools such as:
IBM Rational Rhapsody
Open source Eclipse plugin Topcased
There are many variants of C code generation:
function pointers (parent function do the same code exept a little variant)
inline functions + macro (parameters of macro could define a new functions)
systems like make, cmake, autotools (you write an input-file wich is modified at precompiling)
Tell more if you want to get more detailed answer.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
So our teacher taught us to draw circles lines using c in turboc++, and my issue is, this compiler sucks, so I wanted to use some normal compiler or code editor, and I googled it, but those programs on websites which I found, use graphics.h for drawing circle, but my compiler is showing an error named no such file or directory. The same issue is seen when I use an online compiler.
So plz someone guide me where can I find some good material related to basic computer graphics whose c code does not need turboc++. It can be a book or website or videos on youtube.
Thanks in advance.
There is no standard graphics library in C. It's all third party. So you will never be able to write graphics code that's completely portable.
If you're using Linux, it's possible to use libgraph to enable the use of graphics.h. I found a question on askubuntu that covers this: How do I use graphics.h in Ubuntu?
If you're using Windows, it seems to be possible to use WinBGIm to use graphics.h. Geeks for geeks has instructions for how to use it with CodeBlocks https://www.geeksforgeeks.org/include-graphics-h-codeblocks/
I do not know how good these two options are, but they might be worth trying out. That will at least remove the Turbo dependency.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
When I write scripts/programs, often I would like to pop up a simple text 'gui' to prompt for input:
How would I do this? For example from Shell, Ruby, Golang or C. I don't even know what this is called and Google isn't reponding to "text thingy from scripts".
(The example is from the Debian installer).
Actually, that is not dialog, but the newt library (there are a few differences in appearance). It is used by anaconda on Red Hat systems. The whiptail program uses the library, however it has no real relationship to anaconda.
Anaconda is mostly in Python; it uses the newt shared library (written in C) from a Python binding.
For learning it... documentation is largely non-existent. You have the source code.
Further reading:
screenshots for dialog
newt.git
anaconda.git
Any examples/documentation for python-newt (discussion of newt vs documentation)
Spicing up the Console for Fun and Profit, Part 2
In the past this was known as "Dialog," though as Thomas points out (as the maintainer of Dialog!!) this is no longer the case. This is most likely the Newt library. While you could certainly write something lower level using ncurses, Newt is available in Linux pretty much universally. Dialog can also be installed under Linux. You can read some basic documentation for it here.
Choosing to use this over a curses based approach allows you to focus on what it is you're actually looking to do rather than doing all of the work to build a UI. If, however, you are really looking to build UI elements, ncurses would be the way to go.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a very long convoluted piece of undocumented nightmare code that I have to use, full of mallocs and frees. I have already found a couple that are not matched correctly. Is there any automated source code examination tool that would help me analyse it?
There is a GNU tool for this: It is called GDB, stands for the Gnu DeBugger. You can use it to load a piece of code compiled with the appropriate debug symbols. Then you can use it to put in a temporary break and step through it manually to see exactly what is going on, and you can examine individual functions/subroutines.
For C language, following open-source STATIC CODE ANALYSER tool should be good start.
Cppcheck – Open-source tool that checks for several types of errors, including use of STL.
cpplint – An open-source tool that checks for compliance with Google's style guide for C++ coding.
Clang – An open-source compiler that includes a static analyzer.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
If we take a look under the umbrella of Accelerate Framework we will see several libraries:
I know that BLAS and LAPACK are open source and that the same code used otherwhere can be compiled against Accelerate.
But what about vForce, vMathLib (and other in vMisc) and vDSP? Is there any open source equivalent for those libraries?
EDIT:
Let me elaborate it a little more (only know I have knowledge enough to do so). Basically, vDSP, vFoce and vMathLib are vector oriented libraries. So, if we have a vector and want to calculate a component-wise function over it, say sin() and cos(), it is faster to use vvsincos() from Accelerate because it will pipeline the calculations of sin() and cos() for all the entries in the vector, which is faster than using a for loop over the vector.
Simply expanding those functions in Taylor-series and using trigonometric relations, we see that there are several repetitive calculations going on and the framework tries to avoid this.
This is the same for FFT under vDSP and so forth
Than, my problem is: what is the BEST open source equivalent to this? And if I develop my project under Accelerate, how can I distribute it using open source tools without needing to rewrite my code?
Stephen Canon (#stephencanon) was kind enough to answer me on twitter:
"OpenCV provides some of the vImage functionality and the GSL has some overlap with vDSP. Neither is a complete equivalent and neither is interface-compatibile, so no drop-in replacement like there is with BLAS/LAPACK."
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm looking for a good collection of libraries for ANSI-C, stuff for handling vectors, hash maps, binary tress, string processing, etc.
Try glib? It's used by GTK+, but it can also be used on other platforms. You can also try Apache APR, which is used by the Apache web server and some of their other C components, or NSPR, which is used by Mozilla projects in C.
gnu's glib collection. furthermore, it's portable for many platforms.
You might also find this question useful:
Container Class / Library for C
As well, this book might be interesting:
Mastering Algorithms with C
The full source code is on the CD and it has code for most of those data structures and algorithms.
check also gnulib's data structures. This library also provides many other features as well as portable layer to ANSI/non-ANSI compilers and POSIX/non-POSIX systems.
checkout http://www.invincibleideas.com/library.asp
GLUT OpenGL I can recommend for very flexible C (graphics) development