We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manjaro/Arch x86_64, dmd v2.082.0, dub v1.11.0.
The code in the linkererror branch at https://github.com/zorael/kameloso/tree/linkererror compiles in normal mode but gives an undefined reference error when building with dub --build-mode=singleFile.
The error disappears and compilation succeeds if a local import inside a function (main) is moved up to module-level.
$ git clone https://github.com/zorael/kameloso -b linkererror $ cd kameloso $ dub build --build-mode=singleFile /usr/bin/ld: .dub/build/application-debug-linux.posix-x86_64-dmd_2082-6DCE8163999240FCF02537A83F2B5667/main_4e3dbc0b.o: in function _Dmain': /home/zorael/src/kameloso/source/kameloso/main.d:10: undefined reference to _D8kameloso6logger14KamelosoLogger__T8tintImplVE3std12experimentalQCd4core8LogLeveli64ZQByMxFNbNdNiZAya'
_Dmain': /home/zorael/src/kameloso/source/kameloso/main.d:10: undefined reference to
--- main.d
import std.experimental.logger;
Logger logger;
{ import kameloso.logger; // <-- string infotint = (cast(KamelosoLogger)logger).infotint; }
--- logger.d
module kameloso.logger; import std.experimental.logger; class KamelosoLogger : Logger {
{ super(lv); }
{ return string.init; } alias infotint = tintImpl!(LogLevel.info); }
This sounds like a dub bug.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
zorael reported this on 2018-10-07T20:30:35Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=19291
CC List
Description
Manjaro/Arch x86_64, dmd v2.082.0, dub v1.11.0.
The code in the linkererror branch at https://github.com/zorael/kameloso/tree/linkererror compiles in normal mode but gives an undefined reference error when building with dub --build-mode=singleFile.
The error disappears and compilation succeeds if a local import inside a function (main) is moved up to module-level.
--- main.d
import std.experimental.logger;
Logger logger;
--- logger.d
Comments
razvan.nitu1305 commented on 2023-04-28T11:02:57Z
This sounds like a dub bug.
The text was updated successfully, but these errors were encountered: