Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last example of the C++ interfacing spec doesn't compile #4073

Open
dlangBugzillaToGithub opened this issue Dec 7, 2017 · 1 comment
Open

Comments

@dlangBugzillaToGithub
Copy link

Seb reported this on 2017-12-07T09:20:13Z

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

CC List

Description

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
@dlangBugzillaToGithub
Copy link
Author

bugzilla (@WalterBright) commented on 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant