Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-17 Thread Dicebot via Digitalmars-d-learn
On Thursday, 16 April 2015 at 12:39:07 UTC, Jacob Carlborg wrote: On 2015-04-16 11:56, Dicebot wrote: Simple issue but unpleasant fix. You always must use C++ library that matches base C++ compiler. For GDC it is GCC (which is used by default). For DMD it is DMC (Digital Mars C compiler). For

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-17 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-17 10:16, Dicebot wrote: Does DMD also use GCC conventions on Linux when compiling extern(C++) code? I didn't know that. Not exactly sure that you mean by conventions but extern(C++) and extern(C) follows the ABI of the system compiler. On Linux that is GCC, on OS X it's

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread Dicebot via Digitalmars-d-learn
On Thursday, 16 April 2015 at 08:51:15 UTC, TheGag96 wrote: Hi, I've got this project that requires me to link into a C++ backend. It works just fine when using GDC: gdc *.d [client libraries] However, this command using DMD does not work: dmd -L-lstdc++ *.d [client libraries] I still get

Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread TheGag96 via Digitalmars-d-learn
Hi, I've got this project that requires me to link into a C++ backend. It works just fine when using GDC: gdc *.d [client libraries] However, this command using DMD does not work: dmd -L-lstdc++ *.d [client libraries] I still get errors involving the standard library not being added like:

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread FreeSlave via Digitalmars-d-learn
On Thursday, 16 April 2015 at 08:51:15 UTC, TheGag96 wrote: Hi, I've got this project that requires me to link into a C++ backend. It works just fine when using GDC: gdc *.d [client libraries] However, this command using DMD does not work: dmd -L-lstdc++ *.d [client libraries] I still get

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread John Colvin via Digitalmars-d-learn
On Thursday, 16 April 2015 at 08:51:15 UTC, TheGag96 wrote: Hi, I've got this project that requires me to link into a C++ backend. It works just fine when using GDC: gdc *.d [client libraries] However, this command using DMD does not work: dmd -L-lstdc++ *.d [client libraries] I still get

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-16 11:56, Dicebot wrote: Simple issue but unpleasant fix. You always must use C++ library that matches base C++ compiler. For GDC it is GCC (which is used by default). For DMD it is DMC (Digital Mars C compiler). For LDC it is whatever Clang standard library is called. All those are

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/16/15 4:51 AM, TheGag96 wrote: Hi, I've got this project that requires me to link into a C++ backend. It works just fine when using GDC: gdc *.d [client libraries] However, this command using DMD does not work: dmd -L-lstdc++ *.d [client libraries] I still get errors involving the

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread TheGag96 via Digitalmars-d-learn
On Thursday, 16 April 2015 at 09:46:40 UTC, John Colvin wrote: On Thursday, 16 April 2015 at 08:51:15 UTC, TheGag96 wrote: Hi, I've got this project that requires me to link into a C++ backend. It works just fine when using GDC: gdc *.d [client libraries] However, this command using DMD does

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread TheGag96 via Digitalmars-d-learn
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