You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling against C++ object files, it is possible that the compiler has stripped symbols out of the object file.
For instance, if you have the following code in a cpp file:
```c++
#include<iostream>structFoo
{
void print(){ std::cout << "foo: " << a << ": hello from c++
";
}
int a;
};
```
And try to link against it when compiling with ``clang -c`` it will result in the linker error: ``undefined reference to 'Foo::print()'``.
This is worth mentioning in the docs for Interfacing to C++ page as it could be a gotcha that can lead to people spinning their wheels (it was encountered by someone on Discord).
The text was updated successfully, but these errors were encountered:
Richard (Rikki) Andrew Cattermole reported this on 2022-08-09T14:06:45Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=23290
Description
The text was updated successfully, but these errors were encountered: