[Issue 9093] New: Overloads in extern(C++) interfaces throw up COMDAT errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 28 08:58:23 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9093

           Summary: Overloads in extern(C++) interfaces throw up COMDAT
                    errors
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: gooberman at gmail.com


--- Comment #0 from Ethan Watson <gooberman at gmail.com> 2012-11-28 08:58:22 PST ---
Fairly simple description - create an interface that externs to C++ with a
couple of overloads. Create a class that implements that interface. COMDAT has
an error with defining multiple symbols as a result.

Sample code:

extern (C++) interface ICameraLens
{
    float NearPlane();
    float NearPlane(float p);

}


class NewCameraLens : ICameraLens
{
    extern (C++) float NearPlane() { return 0; }
    extern (C++) float NearPlane(float p) { return 0; }
}

Compiling with the Win64 compiler.

Issue originally was found when working with properties; however, the error
occurs on any overloaded extern'd function.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list