I have compiled clang & cling with few bugfixes using Visual studio 2017, and tried that basic printf Hello world works on cling.
However - next step what I wanted to make is to be able to debug c++ scripts on Visual studio.
Question 1: How to pass arguments to clang from cling command line, I have tried to use
D:\deleteme\cling\build\RelWithDebInfo\bin>cling -cc1 /LDd test.cpp
error: unknown argument: ‘-cc1’
Question 2: Generally C++ compiled as a code is being compiled as static library, and I doubt that you can attach to it with
Visual studio - we need probably .dll + .pdb to be loaded dynamically (shared object / dynamic library).
And this leads to Question 3: Can .pdb’s be produced by clang ?
.pdb as file format probably exists in Visual studio, but I’m not sure if clang is capable of producing Visual studio compatible .pdb file format. I saw some options to switch to CL.exe (Visual studio compiler), I guess it could be one alternative as well.