- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to build my app using icl and MSVC2019 up until recently. I did upgrade/update by accident to MSVC 14.28.29910 and started getting the below error right after the update... below is the sample you could use to reproduce the error along with command line options I use ...
#include <cstdlib>
#include <cstdio>
#include <cmath>
int main(){
printf("a = %f \n", floor(3.4f));
return 0;
}
interestingly enough, same code is compiled and executes fine using MinGW GCC compiler, not the case for ICL though. below you can find the error message.
C:\Users\Mike-laptop\sample>gcc tmp\test.cpp
C:\Users\Mike-laptop\sample>a.exe
a = 3.000000
C:\Users\Mike-laptop\sample>icl tmp\test.cpp
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.2.254 Build 20200623
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
test.cpp
Microsoft (R) Incremental Linker Version 14.28.29913.0
Copyright (C) Microsoft Corporation. All rights reserved.
-out:test.exe
test.obj
test.obj : error LNK2019: unresolved external symbol __floorf referenced in function main
test.exe : fatal error LNK1120: 1 unresolved externals
C:\Users\Mike-laptop\sample>
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
We are able to reproduce the error on our end, we are working on your issue internally and we will get back to you soon.
Meanwhile, could you please try floorf instead of floor in your code and let us know if your issue persists.
printf("a = %f \n", floor(3.4f));
to
printf("a = %f \n",floorf(3.4f));
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
Could you please let us know whether the above-mentioned workaround helped or not?
Also, let us know the Intel Product version(Intel Parallel Studio XE / Intel oneAPI Toolkits) which you are currently using?
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes that partly worked around the problem ...
however, I need to know what is the viable solution when floor's argument is a C++ template variable.
For now, I just had to change the variable types to flout variables (as opposed to template variables).
I currently use "ICL 19.1.2.254 Build 20200623" as part of Intel System Studio.
I am planning to upgrade to oneAPI HPC in near future. I am not sure if it is a good upgrade though. Maybe you can elaborate further please ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
>>"I currently use "ICL 19.1.2.254 Build 20200623" as part of Intel System Studio."
We can see that you are currently using an older version of the Intel compiler which is not compatible with the latest version of Visual Studio. Either you can downgrade the Visual Studio to the supported version or upgrade the Intel compiler.
Please find the details of Intel® Compilers Compatibility with Microsoft Visual Studio* and Xcode*.
>>"I am planning to upgrade to oneAPI HPC in near future. I am not sure if it is a good upgrade though. Maybe you can elaborate further please ???"
Currently, as you are using an older version of the Intel compiler, we recommend you to upgrade to Intel oneAPI to get the latest Intel compilers along with new additional features.
We can see that you are an Intel® System Studio User, so you can install Intel® oneAPI Base & IoT Toolkit which is equivalent to Intel System Studio. Please find the below link for more detail regarding the same.
Please let us know if this helps. Have a Good day.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sadly this problem is still present with oneAPI 2021.2 icl and Visual C++ 19.28.29913 (VS 16.9.3).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I apologize for the delay.
>>" error LNK2019: unresolved external symbol __floorf referenced in function main."
The above issue is resolved in the new oneAPI update, i.e., Intel oneAPI 2021.2 version. We have checked on our end, and we can successfully compile and run the code.
Our Environment details:
Compiler Versions:
- C:\Program Files (x86)\Intel\oneAPI>dpcpp -v >>Intel(R) oneAPI DPC++ Compiler 2021.2.0 (2021.2.0.20210317)
- C:\Program Files (x86)\Intel\oneAPI>icl -v >>Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_0000
Visual Studio Version: VS 2019 16.9.4
OS Version: Windows 10
Could you please try recompiling and running the code after updating it? If your issue persists, please share your environment details along with the compiler versions and error logs.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The attached code gives me this error with the exact same Intel C++ and Visual C++ versions you list on Windows 10 20H2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
C:\Program Files (x86)\Intel\oneAPI>icl -v >>Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_0000
don't work on these new cmath headers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is only seen with later VS2019 versions (e.g. 16.9.3, 16.9.4...).
Please use one of the current supported VS2019 listed https://software.intel.com/content/www/us/en/develop/articles/intel-compilers-compatibility-with-microsoft-visual-studio-and-xcode.html
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem seems to be fixed in ICL2021.5 in oneAPI 2022.1.2 HPC toolkit.
Can you please try it out and let us know so that we can close this case.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not the OP but I can confirm that this problem appears to be fixed in ICL 2021.5 (at least with cl 19.30.30706 from VS2022 17.0.4).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your confirmation. Let's close this thread. If you have any other questions/concerns please create a new one.
Regards,
Viet

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page