Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Linking libimf.a statically

Joseph_A_
Beginner
898 Views

How do I statically link libimf using GCC compiler. 

I have a simple program that I want to statically link with Libimf

#include <stdio.h>
#include <math.h>
int main(){
int c=0;
       float k = 6.25;
       float sin_value = powf(2.15,k);
       printf("POW(2.15,6.25) : %f \n", sin_value);
      return 0;
}

Running, gcc powf-example.c -static /pathtointelLibrary/libimf.a 

gives the following error

 undefined reference to `__intel_cpu_feature_indicator_x'
libm_feature_flag.c:(.text+0x5a): undefined reference to `__intel_cpu_features_init_x'
libm_feature_flag.c:(.text+0x80): undefined reference to `__intel_cpu_features_init_x'
libm_feature_flag.c:(.text+0xa5): undefined reference to `__intel_cpu_features_init_x'
libm_feature_flag.c:(.text+0xc4): undefined reference to `__intel_cpu_features_init_x'
libm_feature_flag.c:(.text+0xe3): undefined reference to `__intel_cpu_features_init_x'

0 Kudos
1 Reply
Viet_H_Intel
Moderator
898 Views

How about adding libirc.a to the command line?

Thanks,

Viet

0 Kudos
Reply