I have a c program, to optimize this program I have tried this:
the original c method has this signature
float **my_method(int m, int n, float **MatrixA, float **VectorB){
//method boby
}
The problem: How to call the compiled optimized "NASMed" version of the method from C?
I have tried to declare this at the beginning of the c file
extern float **my_method(int m, int n, float **MatrixA, float **VectorB);
but when I try to call the method in c for example with
float **res= mymethod(rows, columns, matrix1, vect);
GCC returns me this error: Undefined reference to my_method
the compiled assembly file is named my_method.o
my c file is named my_program.c
I have tried to compile with gcc my_program.c
You might like to use something like
gcc -Wall -Wextra -pedantic my_program.c -o my_program my_method.o
with my_method.o
being the result of the NASM compilation.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments