feat(examples): add a hello project with a library and a consumer
Smallest project that exercises the whole pipeline: one static library and one executable that links against it.
This commit is contained in:
4 files changed
+65
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#include "mathx.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef GREETING
|
||||
#define GREETING "hello"
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
double xs[] = {1.0, 2.0, 3.0, 4.0, 5.0};
|
||||
size_t n = sizeof xs / sizeof xs[0];
|
||||
|
||||
printf("%s\n", GREETING);
|
||||
printf(" dot %.3f\n", vec_dot(xs, xs, n));
|
||||
printf(" norm %.3f\n", vec_norm(xs, n));
|
||||
printf(" mean %.3f\n", stats_mean(xs, n));
|
||||
printf(" stddev %.3f\n", stats_stddev(xs, n));
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user