Cling on windows compiled, but there is a problem

Hi to all,
I compiled cling on windows with visual studio 2022 comunity preview by following the link Compiling Cling on Windows MSVC 2022.
When I launch cling.exe I receive an error that says: “lib/clang/13.0” not found.
Infact c:\cling\lib\clang\13.0 does not exists.
In my system I have clang 15.0.1, installed with visual studio 2022 preview.
How can I solve this problem?
How cling looks for include directories?
Also, I commented line in cmakelists.txt that says (addSubDirectory('cling-demo"). This problem has been solved?
Thanks,
Germano

I think @bellenot can help you.

Hi, I’ll give it a try. But the version of Clang used by Cling is independent of the one installed in your system.

Hello,
I had to recompile cling from source, because the binaries I had downloaded did not work properly with visual studio 20022 preview 5.0.
Whenever I tried to include “string”, or “map”, or “list”, cling would return a series of errors.
After recompiling cling everything works, but when cling starts it gives a directory not found error: c:\cling\lib\clang\13.0.
In fact the directory does not exist.
I can create one, but the version of clang I have installed on the system is 15.0.1, not 13.0 as requested by cling.
Germano

As I said, cling uses its own (internal) version of clang, which is 13.0 (in this case). Does it only complains about the directory, or does it have any other issue? (i.e. can you just ignore the error?)

So I just tried and here is what I got:

C:\Users\bellenot>C:\cling\bin\cling.exe

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ .q

So it works without error message. And if I check what is in the cling\lib\clang directory:


C:\Users\bellenot>dir \cling\lib\clang\13.0.0
 Volume in drive C is Windows
 Volume Serial Number is 7C27-1D31

 Directory of C:\cling\lib\clang\13.0.0

09/01/2023  15:48    <DIR>          .
09/01/2023  15:48    <DIR>          ..
09/01/2023  15:48    <DIR>          include
               0 File(s)              0 bytes
               3 Dir(s)  223,322,664,960 bytes free

So apparently something went wrong when building/installing cling on your computer…

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.