[cfe-dev] Build error on Windows (MinGW)
Ruben Van Boxem
vanboxem.ruben at gmail.com
Thu Jun 16 11:38:57 PDT 2011
Hi,
With recent LLVM+Clang, I get several multiple definition errors when
building Clang and LLVM (both at revision 133168):
[100%] Building CXX object
tools/clang/tools/arcmt-test/CMakeFiles/arcmt-test.dir/arcmt-test.cpp.obj
Linking CXX executable ..\..\..\..\bin\arcmt-test.exe
..\..\..\..\lib\libLLVMSupport.a(CommandLine.cpp.obj):CommandLine.cpp:(.text+0x22b6):
multiple definition of `llvm::cl::ParseCommandLineOptions(int, char**,
char const*, bool)'
..\..\..\..\lib\liblibclang.dll.a(d008925.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(CommandLine.cpp.obj):CommandLine.cpp:(.text+0x852b):
multiple definition of `llvm::cl::PrintHelpMessage()'
..\..\..\..\lib\liblibclang.dll.a(d008899.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(CommandLine.cpp.obj):CommandLine.cpp:(.text$_ZN4llvm2cl3optIbLb0ENS0_6parserIbEEE4doneEv[llvm::cl::opt<bool,
false, llvm::cl::parser<bool> >::done()]+0x0): multiple definition of
`llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::done()'
..\..\..\..\lib\liblibclang.dll.a(d008943.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(CommandLine.cpp.obj):CommandLine.cpp:(.text+0x64):
multiple definition of `llvm::cl::extrahelp::extrahelp(char const*)'
..\..\..\..\lib\liblibclang.dll.a(d009065.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(raw_ostream.cpp.obj):raw_ostream.cpp:(.text+0x282):
multiple definition of `llvm::raw_ostream::operator<<(unsigned long)'
..\..\..\..\lib\liblibclang.dll.a(d002228.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(raw_ostream.cpp.obj):raw_ostream.cpp:(.text+0xb1a):
multiple definition of `llvm::raw_ostream::write(unsigned char)'
..\..\..\..\lib\liblibclang.dll.a(d002208.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(raw_ostream.cpp.obj):raw_ostream.cpp:(.text+0xbda):
multiple definition of `llvm::raw_ostream::write(char const*, unsigned
long long)'
..\..\..\..\lib\liblibclang.dll.a(d002207.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(raw_ostream.cpp.obj):raw_ostream.cpp:(.text+0x1f11):
multiple definition of `llvm::outs()'
..\..\..\..\lib\liblibclang.dll.a(d011520.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(raw_ostream.cpp.obj):raw_ostream.cpp:(.text+0x20bf):
multiple definition of `llvm::errs()'
..\..\..\..\lib\liblibclang.dll.a(d011519.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(PathV2.cpp.obj):PathV2.cpp:(.text+0x225e):
multiple definition of `llvm::sys::path::filename(llvm::StringRef)'
..\..\..\..\lib\liblibclang.dll.a(d010452.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(Path.cpp.obj):Path.cpp:(.text+0x2cfc):
multiple definition of `llvm::sys::Path::GetMainExecutable(char
const*, void*)'
..\..\..\..\lib\liblibclang.dll.a(d010404.o):(.text+0x0): first defined here
..\..\..\..\lib\libLLVMSupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x371):
multiple definition of `llvm::sys::PrintStackTraceOnErrorSignal()'
..\..\..\..\lib\liblibclang.dll.a(d010345.o):(.text+0x0): first defined here
..\..\..\..\lib\libclangLex.a(Lexer.cpp.obj):Lexer.cpp:(.text+0xd5c):
multiple definition of
`clang::Lexer::MeasureTokenLength(clang::SourceLocation,
clang::SourceManager const&, clang::LangOptions const&)'
..\..\..\..\lib\liblibclang.dll.a(d021476.o):(.text+0x0): first defined here
..\..\..\..\lib\libclangBasic.a(Diagnostic.cpp.obj):Diagnostic.cpp:(.text+0x36e):
multiple definition of
`clang::Diagnostic::setClient(clang::DiagnosticClient*, bool)'
..\..\..\..\lib\liblibclang.dll.a(d014750.o):(.text+0x0): first defined here
..\..\..\..\lib\libclangBasic.a(Diagnostic.cpp.obj):Diagnostic.cpp:(.text+0x6c):
multiple definition of
`clang::Diagnostic::Diagnostic(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>
const&, clang::DiagnosticClient*, bool)'
..\..\..\..\lib\liblibclang.dll.a(d014751.o):(.text+0x0): first defined here
..\..\..\..\lib\libclangBasic.a(Diagnostic.cpp.obj):Diagnostic.cpp:(.text+0x24e):
multiple definition of `clang::Diagnostic::~Diagnostic()'
..\..\..\..\lib\liblibclang.dll.a(d014753.o):(.text+0x0): first defined here
..\..\..\..\lib\libclangBasic.a(DiagnosticIDs.cpp.obj):DiagnosticIDs.cpp:(.text+0x72e):
multiple definition of `clang::DiagnosticIDs::DiagnosticIDs()'
..\..\..\..\lib\liblibclang.dll.a(d016349.o):(.text+0x0): first defined here
..\..\..\..\lib\libclangBasic.a(DiagnosticIDs.cpp.obj):DiagnosticIDs.cpp:(.text+0x758):
multiple definition of `clang::DiagnosticIDs::~DiagnosticIDs()'
..\..\..\..\lib\liblibclang.dll.a(d016351.o):(.text+0x0): first defined here
..\..\..\..\lib\libclangBasic.a(SourceManager.cpp.obj):SourceManager.cpp:(.text+0x33c6):
multiple definition of
`clang::SourceManager::getPresumedLoc(clang::SourceLocation) const'
..\..\..\..\lib\liblibclang.dll.a(d028453.o):(.text+0x0): first defined here
collect2: ld returned 1 exit status
More information about the cfe-dev
mailing list