Bug 18043 – Last example of the C++ interfacing spec doesn't compile

Status
NEW
Severity
major
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2017-12-07T09:20:13Z
Last change time
2024-12-15T15:24:28Z
Assigned to
No Owner
Creator
Seb
Moved to GitHub: dlang.org#4073 →

Comments

Comment #0 by greensunny12 — 2017-12-07T09:20:13Z
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
Comment #1 by bugzilla — 2019-12-18T10:44:14Z
Which example do you mean? I tried the one on: https://dlang.org/spec/cpp_interface.html and got the expected result (A, B and C in separate lines). Is this the correct one?
Comment #2 by robert.schadek — 2024-12-15T15:24:28Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/4073 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB