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

error LNK2001: unresolved external symbol __intel_cpu_feature_indicator

Jump to solution

Dear all,

I encounter these errors:

error LNK2001: unresolved external symbol __intel_cpu_feature_indicator
error LNK2001: unresolved external symbol __intel_cpu_feature_indicator_x
error LNK2001: unresolved external symbol __intel_cpu_features_init

I tried using both -NODEFAULTLIB and linking directly to the static libraries I used (including MKL libraries) and without -NODEFAULTLIB

I am using Microsoft Visual Studio 2017 and Intel Parallel Studio XE 2017.

Many thanks,

Tudor Cretu

0 Kudos

Accepted Solutions
Highlighted
Black Belt Retired Employee
159 Views

Thanks for the log. I see that your copy of ANSYS includes its own versions of some Intel libraries, such as libirc, libmmd, and most telling, libguide. libguide is a very old OpenMP library long since replaced in the Intel product.  The references to __intel_cpu_feature_indicator are coming from the ANSYS library, and this suggests it was compiled with a VERY old Intel compiler. To be honest I'm a bit disturbed/annoyed that these entry points were removed from the Intel libraries, but that was on the C side and Intel C++ hasn't had the same commitment to upward compatibility that Intel Fortran has.

Of course, your log reveals a LOT of other unresolved references, not to Intel-supplied procedures, that you will also have to work through. But in the immediate case I suggest that you get a more current version of ANSYS and see if that helps. Given that ANSYS is including its own copies of old Intel libraries those won't be compatible with current Intel compilers.

View solution in original post

0 Kudos
6 Replies
Highlighted
Black Belt
159 Views

The information that you have given is incomplete.

In particular, the linker would have listed the objects that referenced the unresolved externals. I suspect that some of those objects (presented to the linker individually or in a library) were compiled with a different version of the compiler(s). Knowing the names of those referencing objects, one could look into how those were compiled and which libraries/DLLs they depend on.

0 Kudos
Highlighted
Beginner
159 Views

@mecej4

Thank you!

I didn't write the names of the objects who gave the error because there were hundreds of them who gave the same error in multiple libraries I am using. How to check how those objects were compiled and which libraries/DLLs they depend on? 

Also, if they were compiled with a different version of the Visual Studio? What should I do about it? I am not able to recompile the libraries because I don't have the source code. Is there any workaround or do I need to install that specific version of visual studio?

Thank you for your time!

Tudor Cretu

0 Kudos
Highlighted
Black Belt Retired Employee
159 Views

You are probably linking against a version of the Intel Fortran run-time libraries that is older than the one that compiled the objects.  This ordinarily would not happen if you built normally within Parallel Studio XE 2017, but maybe you have specified a different set of libraries to link against. It would be helpful if you were to set the property Linker > General > Show Progress to "Show all progress messages", do a rebuild, and then attach a ZIP of the buildlog.htm to a reply here for us to look at.

0 Kudos
Highlighted
Beginner
159 Views

Dear Steve,

Thank you for your reply!

I attached here the buildlog.htm zipped. 

Best wishes,

Tudor Cretu

0 Kudos
Highlighted
Black Belt Retired Employee
160 Views

Thanks for the log. I see that your copy of ANSYS includes its own versions of some Intel libraries, such as libirc, libmmd, and most telling, libguide. libguide is a very old OpenMP library long since replaced in the Intel product.  The references to __intel_cpu_feature_indicator are coming from the ANSYS library, and this suggests it was compiled with a VERY old Intel compiler. To be honest I'm a bit disturbed/annoyed that these entry points were removed from the Intel libraries, but that was on the C side and Intel C++ hasn't had the same commitment to upward compatibility that Intel Fortran has.

Of course, your log reveals a LOT of other unresolved references, not to Intel-supplied procedures, that you will also have to work through. But in the immediate case I suggest that you get a more current version of ANSYS and see if that helps. Given that ANSYS is including its own copies of old Intel libraries those won't be compatible with current Intel compilers.

View solution in original post

0 Kudos
Highlighted
Beginner
159 Views

Dear Steve,

Thank you very much for your insight! I understand it better now! Your comment really helped very much!

Best wishes,

Tudor Cretu

0 Kudos