Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7644 Discussions

Link error "undefined symbol" when using some cmath functions with interprocedural optimisation

Sebastien_B_1
Beginner
483 Views

My setup: VS2017, Intel C++ Compiler 2021 (OneAPI base toolkit 2021.2)

 

Hi all,

When I try to compile an application the uses acosh or cbrt from cmath (and probably other cmath functions), it works when interprocedural optimisation is disabled.

If I set Interprocedural optimisation to "Multi-File (/Qipo)", I get undefined symbol error:

1>lld-link: : error : undefined symbol: __declspec(dllimport) __svml_acosh32

1>lld-link: : error : undefined symbol: __declspec(dllimport) __svml_acosh64

 

Here is a minimal example:

#include <iostream>

#include "cmath"


int main() {
  std::cout << "success " << std::acosh(2.0) << std::endl;
  return 0;
}

 

It seems like a bug. Any idea?

0 Kudos
5 Replies
ShivaniK_Intel
Moderator
442 Views

Hi,


Thanks for reaching out to us.


We are unable to reproduce the error at our end with the same version of the OneAPI Base Toolkit. Could you please provide your vsx project file so we can check the configuration and debug it?


Thanks & Regards

Shivani


Sebastien_B_1
Beginner
439 Views

Thanks for your reply.

See attached a complete project that fails on my side. Note that it fails in Release mode.

ShivaniK_Intel
Moderator
405 Views

Hii,


We are able to reproduce the error on our end. We are working on it and will get back to you soon.


Thanks&Regards

Shivani




Viet_H_Intel
Moderator
140 Views

Can you try with the latest oneAPI to see if the issue is resolved?


Viet_H_Intel
Moderator
80 Views

Looks like this issue no longer reproduces in oneAPI. Thus, we are going to close this thread.

If you need anything else, please create a new one.

Thanks,

 

Reply