http://d.puremagic.com/issues/show_bug.cgi?id=6121
Summary: Can't link with DMC C++ generated functions with long arguments Product: D Version: unspecified Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-06-07 11:11:04 PDT --- foo.d: extern(C++) void test(int); void main() { test(1); } bar.cpp: void test(long) { }; $ dmc -c -cpp bar.cpp $ dmd foo.d bar.obj http://www.digitalmars.com/ctg/optlink.html foo.obj(foo) Error 42: Symbol Undefined ?test@@YAXH@Z (void cdecl test(int )) Symbol reference in foo.obj (D): ?test@@YAXH@Z Symbol in bar.obj (CPP): ?test@@YAXJ@Z According to this page: http://www.digitalmars.com/ctg/ctgMemoryModel.html , long in DMC has the same size as int in D. I've tried various other types but nothing works. Only if I change bar.cpp's test to: void test(int){} then it will compile and link. So how am I supposed to link with C++ functions that take a long if I can't change them? Due to this bug I can't link DDMD with the backend of DMD 2.053. Also, your DMC echoes 8.42n instead of 8.52c, fyi. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------