Already fixed it thx
I got 5 files: cdouble.c cdouble.h cmatrix.c cmatrix.h and main.c
in my cdouble.c I have:
#include "cdouble.h"
in my cmatrix.c I have:
#include "cmatrix.h"
(in my cmatrix.h file i got: #include "cdouble.h"
And in my main file I have:
#include "cmatrix.h"
I need to compile it on my university's unix(?) server. I tried:
gcc -c cmatrix.c
gcc cmatrix.o main.c
but I got many "undefined reference errors"
$ gcc -c cmatrix.c
gcc cmatrix.o main.c: /tmp/ccZD6esL.o: In function
ishermitian
:
main.c:(.text+0x7b): undefined reference tocConj
main.c:(.text+0x8b): undefined reference togetCDoubleImag
main.c:(.text+0xa0): undefined reference togetCDoubleReal
main.c:(.text+0xde): undefined reference togetCDoubleImag
main.c:(.text+0xef): undefined reference togetCDoubleImag
main.c:(.text+0x111): undefined reference togetCDoubleReal
main.c:(.text+0x122): undefined reference togetCDoubleReal
/tmp/ccZD6esL.o: In functionscancdouble
:
main.c:(.text+0x203): undefined reference tonewCDouble
/tmp/ccZD6esL.o: In functionmain
:
main.c:(.text+0x2d8): undefined reference togetCDoubleImag
main.c:(.text+0x2fc): undefined reference togetCDoubleReal
collect2: error: ld returned 1 exit status