yes, there are so many projects running under Linux that come along with source.
On the other hand, probably I’m about to miss the forest for the trees.
I once wrote a Finite Element computer program to run under MacOS 8/9,
using only a command line interface (MPW).
Now I would like to port that code - which doesn’t rely on special hardware.
The source code is plain C - I don’t speak C++ (etc.).
It would help me to see an example of how to build and link libraries under Linux
from plain C source, in order to get a working program.
As a next step - not necessarily the same project - it would help me to have
a look at a project, in which use of parallel execution on several processors/cores
has been made - at best a program that as well is written in plain C.
thank you for the 1st link.
I already searched for online tutorials on the web, but that one isn’t bad.
However, that one still doesn’t seem to explain/demonstrate how to build a library (instead of just linking it).
Look, for the Finite Element program I wrote, I even coded my own BLAS (Basic Linear Algebra System).
I coded static arrays of pointers to functions within those BLAS routines,
although this isn’t a component / excluded in ANSI C Standard
(it still is possible using type casts for pointers).
What I need is indeed a bit more than “Hello World”.
Still, further, I would appreciate very much to get a link to a project with code written in plain C
that makes use of programming parallel execution of code (i.e. running threads in parallel on the several
cores of my processor to e.g. speed up the numerical solution of a matrix equation),
so I could play around with that, and use it as a template.
I haven’t had experience with parallel programming, but openMP is a multi-threading implementation of interest here. The following might give you the background and examples to get going
ratzi wrote:
> I once wrote a Finite Element computer program to run under MacOS 8/9,
> using only a command line interface (MPW).
>
> Now I would like to port that code - which doesn’t rely on special
> hardware.
Sounds like an interesting project.
> It would help me to see an -example- of how to build and link
> libraries under Linux
> from plain C source, in order to get a working program.
>
> As a next step - not necessarily the same project - it would help me to
> have
> a look at a project, in which use of parallel execution on several
> processors/cores
> has been made - at best a program that as well is written in plain C.
Just for giggles.
The canonical example of what you’ve just described is … the Linux
kernel
There’s a fair amount of documentation about, I believe, but it’s
possibly not the best example to start with
OK, but that may take a while, because porting that code isn’t my only task, currently.
First I will have to get that code running under Linux (here openSUSE).
After all my experience, having code running is the basis for anything further.
That in addition would provide a basis for comparisons of performance
(single thread vs. parallel execution).
Probably I’ll report in a new thread if I succeed.
Many of the projects accessible through these links are a bit older,
so examples for parallel programming might only be found scarcely
following these links.
However, the maths that form the background didn’t change.
FontForge looks as a good C project including makefiles for libraries - I’m not
a newcomer to C, but I never compiled under Linux until present, sorry.
Anyway, I don’t want to invent the wheel again lol!
In addition, FontForge is a nice program helping to improve or to even create new fonts.