Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28558 Discussions

mlk error "Undefined symbols for architecture x86_64" on macOS Mojave


I’m relatively new in Intel Fortran compiler. I'm trying to use MKL library. I have followed the instruction to install the compiler and the library. I ran and with intel64 option. Y compiled an example code (ifort scasumx.f -mkl -o scasumx) but I had the following error:

Undefined symbols for architecture x86_64:

  "_printvectorc_", referenced from:

      _MAIN__ in ifortSfQ2wY.o

ld: symbol(s) not found for architecture x86_64

Can somebody help me?

I'm using Intel Fortran Compiler for MacOS on MacOS Mojave with Command Line Tools macOS 10.14 for Xcode 10.2.


0 Kudos
1 Reply
Honored Contributor III

Some of the MKL examples use utility routines such as printvectorc to output vectors and matrices in readable format. Look for a file with a name such as common_func.f (or common_func.c, if you are using C) in the same directory as the example sources or in a nearby directory. You have to compile and link that file along with the rest of the example source files.

The precise details may differ between different versions of MKL. See, for example, .

0 Kudos