http://llvm.org/bugs/show_bug.cgi?id=13488
Bug #: 13488
Summary: [Windows] error LNK2005: vftable already defined when
linking with cl-compiled object files
Product: clang
Version: unspecified
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Repro (see notes below!):
$ cat with_clang.cpp
class A {
public:
virtual ~A();
};
A::~A() {}
$ cat with_cl.cpp
class A {
public:
virtual ~A();
};
int main() {
A x;
}
$ clang -Xclang -cxx-abi -Xclang microsoft -fno-rtti -c with_clang.cpp
$ cl -nologo -c with_cl.cpp
$ link -nologo with_cl.obj with_clang.o
with_cl.cpp
with_clang.o : error LNK2005: "const A::`vftable'" (??_7A@@6B@) already defined
in with_cl.obj
with_cl.exe : fatal error LNK1169: one or more multiply defined symbols found
Notes:
my clang checkout is r160851 and has two patches applied:
1) revert r159091 due to bug 13231
2) local workaround for bug 12784 which doesn't emit Ctor_Complete,
Dtor_Deleting and Dtor_Complete when getCXXABI() == CXXABI_Microsoft
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs