Exception when using virtual functions (on windows)

Build cling from git.
Test in on windows. Without virtual function it’s ok. With virtual function it has exception:


class  Foo { public: virtual void func() { }; };
void Run() { Foo foo; }

cling console

.L test.cpp
>>> Caught an interpreter exception!
>>> ELF COMDATs only support SelectionKind::Any, '☺??_7Foo@@6B@' cannot be lowered.

I think, in ROOT 5 (which uses CINT), you need to “precompile” classes with virtual methods, e.g. try:
.L test.cpp++

.L ++ command seems doesn’t work.

.L test.cpp++ input_line_10:1:10: fatal error: 'test.cpp++' file not found #include "test.cpp++"
I also use embedded cling , and it crash my program when try to use class with virtual function.


ACLiC (which provides support for the ++) is an extension only present in ROOT.

Note that the example works fine on linux. Support for cling on Windows is not yet complete (so we expect still a few unexpected issues), we need to investigate this issue.


Are there any updates on this issue?

We load a .dll into cling on windows and would like to declare derivatived classes with virtual functions.

We still get “ELF COMDATs” errors