I started learning C++/Visual Studio about 3 weeks ago and Root yesterday, so please assume I have no idea about anything.
My problem in a short summary:
How do I connect root to an existing C++ Code in Windows Visual Studio 2019, so I can use root commands in it?
In the context of my Master Thesis I got a Data Acquisition Card (TimeTagger4-2G by Cronologic) for my Multichannel Plate. Unfortunately it was quite cheap, because it came without a ready to use software. Only a C++ example program, some .dll, some .lib and the Windows specific drivers (hence why I use windows visual studio) were included. The example program I managed to build, run and it does what it is supposed to do. Since I need to make histograms out of my data someone suggested I use root for this. I started learning root yesterday.
So how can I include the root commands in the already existing C++ example Code?
- using Windows Visual Studio 2019
- OS: Windows 10 64bit
- root version: root_v6.18.04
What I do understand so far:
- You have to connect the correct .dll in Visual Studio.
- You have to connect the correct .lib in Visual Studio. (For both I use this step for step guide: [https://docs.microsoft.com/en-us/cpp/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp?view=vs-2019])
- You have to do something with stuff called “headers”, like including similar commands like this in the beginning
What I tried so far:
I installed root by downloading the Pro .exe file from here: [https://root.cern.ch/downloading-root] and double clicking on it, when the download was complete. I connected the bin folder with all the .dll to my visual studio project and also the lib folder with all the .lib. I also copy pasted the content of the include folder into the same folder as my visual studio project. The only thing I changed in the code itself was to add in the beginning the command
So far I get build errors. I assume I do something fundamentally wrong, but I can’t find a solution by Google or reading the user guide, because everything I find assumes a higher level of competence from the reader than I have, especially regarding windows visual studio.