[cfe-dev] LLVM ERROR: Program used external function '??_7type_info@@6B@' which could not be resolved!
David Majnemer via cfe-dev
cfe-dev at lists.llvm.org
Wed Jun 8 08:31:56 PDT 2016
On Wed, Jun 8, 2016 at 2:52 AM, Stammerjohann, Kai via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hi,
>
> When I try to run this code via lli:
>
> #include <stdio.h>
>
> int main()
> {
> try
> {
> throw "hi";
> }
> catch (const char *msg)
> {
> printf("%s\n", msg);
> }
> return 0;
> }
>
> It works as expected on linux but fails on windows:
> LLVM ERROR: Program used external function '??_7type_info@@6B@' which
> could not be resolved!
>
> This is what I execute:
> clang -fexceptions -c -emit-llvm a.cpp
> lli a.bc
>
> I guess "??_7type_info@@6B@" (aka "const type_info::`vftable'") comes
> from libcmt.lib and would require link.exe to resolve.
> type_info sounds like RTTI, but disabling (-fno-rtti) doesn't it fix the
> problem, I guess it's a requirement for exceptionhandling?
>
Exception handling relies on RTTI and controls different, but related,
machinery from -fno-rtti.
>
> Is there a way to use gnu exception handling on windows generated bitcode?
Yes, you could use a mingw triple.
> For my usecase, its perfectly fine to break compatibility to microsoft
> binaries (I tried to run clang with various targettriples, but didn't get
> it to work)
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160608/379ba8ad/attachment.html>
More information about the cfe-dev
mailing list