Linking C++ standard library works with GDC... but not DMD. (Linux)
TheGag96 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Apr 16 07:21:07 PDT 2015
On Thursday, 16 April 2015 at 12:57:12 UTC, Steven Schveighoffer
wrote:
>> /usr/include/c++/4.8/iostream:74: undefine reference to
>> `std::ios_base::Init::Init()'
>> (etc.)
>
> Try dmd -v to tell you exactly what command it is running for
> link. Then play around with the link line to see if you can
> figure out a way to link it correctly.
>
> We can work on fixing the situation from there. Maybe there's a
> way to link using dmd, maybe we have to fix dmd so it allows
> the correct link call.
>
> -Steve
Got it!! This is what helped me the most. I compiled a regular
C++ program with the -v flag, found where my libstdc++.a was,
added it to the command and bam. I really should have thought of
this one earlier... Thanks for the quick support, everyone!
More information about the Digitalmars-d-learn
mailing list