using clang tools within a c program

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

using clang tools within a c program

Eric Fiselier via cfe-dev
Hello

I though that libclang was the C interface to clang but It seems that libclang is all C++ and so I have to use C++ compiler and extern my c code?

Best

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: using clang tools within a c program

Eric Fiselier via cfe-dev
On 2017-09-16 13:47, blubee blubeeme via cfe-dev wrote:
> Hello
>
> I though that libclang was the C interface to clang but It seems that
> libclang is all C++ and so I have to use C++ compiler and extern my c code?

No, libclang has a C interface. libclang and the whole compiler are
implemented in C++ but it does provide a C interface [1].

[1] https://clang.llvm.org/doxygen/group__CINDEX.html

--
/Jacob Carlborg

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev