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:

test.cpp

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

cling console

.L test.cpp
Run();
>>> 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++
Run();

.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.

Hi,

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.

Cheers,
Philippe.

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

-Trevor