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

           Summary: extern(C++) does not work with linux
           Product: D
           Version: 2.014
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: link-failure
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


foo.cpp file:
struct board{ void clear(){} };

bar.d file:
extern(C++){ struct board{ void clear(); } }
void main(){
  board b;
  b.clear();
}

build steps:
g++ -c foo.cpp -o foo.o
dmd -c bar.d -ofbar.o
gcc foo.o bar.o -L/usr/local/lib -L/usr/lib/gcc/i486-linux-gcc/4.3 -lstdc++ -l
phobos2 -lpthread

This was tried with Ubuntu 8.10 and dmd 2.014


-- 

Reply via email to