0

I'm new to working with Visual C++ and I would like to add libclang as a dependency to my project. I have downloaded LLVM and compiled libclang successfully with cmake in a separate directory outside my Visual C++ solution.

I would like copy the compiled libclang artifacts to my solution so I keep them with my project for portability. I am using Visual Studio 2017 currently.

What is the recommended way to include the libclang artifacts in my project and mark them as dependencies so I can access those libraries in my code?

Sienna
  • 1,570
  • 3
  • 24
  • 48
  • The proper way to do would be to use cmake for your project and import libclang targets, instead of merging libclang binaries in your project. It's not portable otherwise... – Matthieu Brucher Mar 14 '19 at 16:50
  • Oh okay, thanks for the information. My portability goal is mostly so others can download my project and it will have all the libclang dependencies. I will explore the CMake option, thanks. – Sienna Mar 14 '19 at 17:09
  • Use CMake, make people download clang (specific version) and tell them how to build it, then your project will use the libclang install through CMake. Everyone's happy and you are truly portable. – Matthieu Brucher Mar 14 '19 at 17:10

0 Answers0