Issue 52969
Summary LLD on windows reports an undefined symbol for a function in a linked dependency
Labels new issue
Assignees
Reporter ddobrev
    I'm trying to link some very simple code on windows 7 64-bit:
```c++
#include <QtCore>

class QString (*identifier)(const class QString&) = &QRegularExpression::anchoredPattern;
```
with `Qt5Core 5.15.2`. I get this error:

`windows: error: undefined symbol: __declspec(dllimport) QRegularExpression::anchoredPattern(QStringView)`

At the same time opening `Qt5Core.dll` with [`Dependency Walker 2.2`](https://dependencywalker.com/) shows this inside:

`_ZN18QRegularExpression15anchoredPatternE11QStringView`

which https://demangler.com/ proves to be exactly [QRegularExpression::anchoredPattern(QStringView)](https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/text/qregularexpression.h?h=5.15.2#n161).

My guess which I hope can be of use is that `LLD` is confused by `QStringView` which you can see in https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/text/qstringview.h?h=5.15.2#n104 isn't exported.
The MinGW linker works fine.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to