[LLVMdev] Compiling via bitcode on Windows
Russell Wallace
russell.wallace at gmail.com
Mon Feb 2 08:30:12 PST 2015
I'm trying to use Clang on Windows to compile C++ to bitcode and then to an
executable (with a view to carrying out some experiments on whole program
optimization of the bitcode).
When I use clang.exe, even with -D_HAS_EXCEPTIONS=0 -fms-compatibility
-fms-extensions, I get errors:
main-621e97.o : error LNK2019: unresolved external symbol _Unwind_Resume
referenced in function main
main-621e97.o : error LNK2001: unresolved external symbol
__gxx_personality_v0
main-621e97.o : error LNK2019: unresolved external symbol
__cxa_call_unexpected referenced in function "public: class
std::_Vector_iterator<class std::_Vector_val<struct
std::_Simple_types<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > > > __cdecl
std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > >::begin(void)"
(?begin@?$vector at V?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@
@std@@V?$allocator at V?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@
@std@@@2@@std@@QEAA?AV?$_Vector_iterator at V?$_Vector_val at U?$_Simple_types at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@std@@@std@
@@2 at XZ)
a.out : fatal error LNK1120: 3 unresolved externals
clang-cl.exe avoids those errors and can generate an executable from C++,
but it doesn't seem to have -emit-llvm or an equivalent option.
What am I missing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150202/50790371/attachment.html>
More information about the llvm-dev
mailing list