Summary: Can't link with DMC C++ generated functions with long
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Andrej Mitrovic <> 2011-06-07 
11:11:04 PDT ---
extern(C++) void test(int);
void main()

void test(long)

$ dmc -c -cpp bar.cpp
$ dmd foo.d bar.obj
 Error 42: Symbol Undefined ?test@@YAXH@Z (void cdecl test(int ))

Symbol reference in foo.obj (D):
Symbol in bar.obj (CPP):

According to this page: ,
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:
------- You are receiving this mail because: -------

Reply via email to