how to execute matlab coder static library or binary

4 visualizzazioni (ultimi 30 giorni)
I am trying to learn to use Matlab Coder and I have followed the instructions over on:
I have got the static libraries and also built the binary using gcc like so:
```
gcc -I/mcodegen/codegen/lib/euclidean -I/mcodegen/codegen/lib/euclidean/examples/ -Wall -o main main.c /mcodegen/codegen/lib/euclidean/euclidean.c /matlabcodegen/codegen/lib/euclidean/euclidean_terminate.c -lm
```
I get a nice main binary, with no errors.
But how do I execute this binary? doing ./main gives no output. I presume it expects the inputs but I am unsure what is the correct way to specify this. The docs dont really mention how to use the lib or the executable, so I am not sure how to proceed from here :(
Any help or suggestions would be great
rachel
  2 Commenti
Raghu Boggavarapu
Raghu Boggavarapu il 18 Gen 2021
Please refer to the code in codegen/lib/euclidean/examples/main.c to see how to call the generated library code. There are example functions generated in "main.c" illustrating how to pass parameters to generated library functions and get useful results.
Raghu Boggavarapu
Raghu Boggavarapu il 18 Gen 2021
Sample main.c does not print out any computed results. You have write a function to extract the data and print the results. Functions in the file main.c will illustrate how to pass the arguments to the generated library file and get return values.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB Coder in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by