Foadsf / Cmathtuts

trying to collect all useful tutorials for famous C math and linear algebra libraries such as CBLAS, CLAPACK, GSL...
GNU General Public License v3.0
415 stars 47 forks source link

compiling blas with -lgfortran #2

Open iurisegtovich opened 7 years ago

iurisegtovich commented 7 years ago

Quoting your README.md "for some of the BLAS and CBLAS examples the -lgfortran is requred to compile. I don't know why!"

you probably mean link with -lgfortran, and not *compile. that happens because when you want to link objects, some of which were compiled with gcc and some with gfortran, then you must use gfortran to link, or gcc plus the -lgfortran library

example: gfortran fobject.o cobject.o -o program.bin gcc fobject.o cobject.o -o program.bin -lgfortran

Foadsf commented 7 years ago

Well, As I mentioned in my other reply, I did this while ago and I do not remember exactly what was the problem. But I'm sure I knew the difference between the two different ways to compile a mixed object file at the moment. I believe the issue had to do with lots of failed attempts I had to install/compile the libraries and something was messed up with my operating system probably. Thanks for your comment anyway :)