Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
51 Views

Linking libimf.a statically

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
Highlighted
Moderator
51 Views

How about adding libirc.a to the command line?

Thanks,

Viet

0 Kudos