Re: Nested C++ namespace library linking

2015-01-21 Thread Guillaume Chatelet via Digitalmars-d-learn
On Wednesday, 21 January 2015 at 14:59:15 UTC, John Colvin wrote: Looks like a bug to me, for sure. In the mean-time you may be able to use some pragma(mangle, ...) hacks to force the compiler to emit the right symbols. Thx John, extern(C++, A.B) { struct Type {} pragma(mangle,"_ZN1A1B3f

Re: Nested C++ namespace library linking

2015-01-21 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 20 January 2015 at 21:10:59 UTC, Guillaume Chatelet wrote: Consider the following foo.cpp namespace A { namespace B { struct Type {}; int foo(Type unused){ return 42; } } } Compile it : g++ foo.cpp -c -o foo.o Then the following main.d extern(C++, A.B) { struct Type {} int

Re: Nested C++ namespace library linking

2015-01-21 Thread Kagamin via Digitalmars-d-learn
You can ask to add a keyword to bugzilla for C++ issues, this can help to improve their visibility and searchability.

Re: Nested C++ namespace library linking

2015-01-20 Thread Guillaume Chatelet via Digitalmars-d-learn
That's what I thought. I reported this bug a while ago but it didn't get a lot of attention. https://issues.dlang.org/show_bug.cgi?id=13337

Re: Nested C++ namespace library linking

2015-01-20 Thread Paul O'Neil via Digitalmars-d-learn
On Tuesday, 20 January 2015 at 21:10:59 UTC, Guillaume Chatelet wrote: Consider the following foo.cpp namespace A { namespace B { struct Type {}; int foo(Type unused){ return 42; } } } Compile it : g++ foo.cpp -c -o foo.o Then the following main.d extern(C++, A.B) { struct Type {} int

Nested C++ namespace library linking

2015-01-20 Thread Guillaume Chatelet via Digitalmars-d-learn
Consider the following foo.cpp namespace A { namespace B { struct Type {}; int foo(Type unused){ return 42; } } } Compile it : g++ foo.cpp -c -o foo.o Then the following main.d extern(C++, A.B) { struct Type {} int foo(Type unused); } void main() { foo(Type()); } Compile it : dmd m