www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18043] New: Last example of the C++ interfacing spec doesn't

https://issues.dlang.org/show_bug.cgi?id=18043

          Issue ID: 18043
           Summary: Last example of the C++ interfacing spec doesn't
                    compile
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

g++ -c foo.cpp
dmd bar.d foo.o -L-lstdc++

foo.o:foo.d:function _Dmain: error: undefined reference to 'void
increment<int>(Foo<int>&)'
foo.o:foo.d:function _Dmain: error: undefined reference to 'void
increment<char>(Foo<char>&)'
foo.o:foo.d:function _Dmain: error: undefined reference to 'void
printThreeNext<char>(Foo<char>)'
collect2: error: ld returned 1 exit status

--
Dec 07 2017