Re: interfacing cpp

2024-10-22 Thread Salih Dincer via Digitalmars-d-learn
On Tuesday, 22 October 2024 at 10:50:22 UTC, f wrote: std.cpp -- ```c #include \ #include \ #include \ using namespace std; void a(string a) { cout\<\<" hello " \<\libstdc++ std::__cxx11::basic_string is not yet supported; the struct contains an interior pointer which breaks

Re: interfacing Cpp - GCC Dual ABI abi_tag in name mangling

2017-04-30 Thread via Digitalmars-d-learn
On Sunday, 30 April 2017 at 11:35:54 UTC, Jacob Carlborg wrote: You can use pragma(mangle, "some mangling"); to set the mangled name of a symbol. that's a quick hack, but sooner or later dmd needs to add some rules for this in the internal cpp mangler, since gcc is the main compiler in gnu/li

Re: interfacing Cpp - GCC Dual ABI abi_tag in name mangling

2017-04-30 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-04-29 20:08, سليمان السهمي (Soulaïman Sahmi) wrote: GCC has this attribute called abi_tag that they put on any function that returns std::string or std::list, for the rational behind that read here:https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html . the special thing wit

Re: interfacing Cpp - GCC Dual ABI abi_tag in name mangling

2017-04-29 Thread via Digitalmars-d-learn
On Saturday, 29 April 2017 at 19:16:14 UTC, kinke wrote: On Saturday, 29 April 2017 at 18:08:16 UTC, سليمان السهمي (Soulaïman Sahmi) wrote: GCC has this attribute called abi_tag that they put on any function that returns std::string or std::list The usual workaround is compiling the C++ source

Re: interfacing Cpp - GCC Dual ABI abi_tag in name mangling

2017-04-29 Thread kinke via Digitalmars-d-learn
On Saturday, 29 April 2017 at 18:08:16 UTC, سليمان السهمي (Soulaïman Sahmi) wrote: GCC has this attribute called abi_tag that they put on any function that returns std::string or std::list The usual workaround is compiling the C++ source with _GLIBCXX_USE_CXX11_ABI=0 for gcc >= 5.