C:\Users\bellenot\rootdev\forum>cl -EHsc -Zc:__cplusplus -std:c++17 roottest.cxx -I %ROOTSYS%\include /link -LIBPATH:%ROOTSYS%\lib libCore.lib libGui.lib libHist.lib
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30148 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
roottest.cxx
Microsoft (R) Incremental Linker Version 14.29.30148.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:roottest.exe
-LIBPATH:C:\Users\bellenot\build\x86\release\lib
libCore.lib
libGui.lib
libHist.lib
roottest.obj
C:\Users\bellenot\rootdev\forum>roottest
Hello World
Hello World
Press any key to continue . . .
So I downloaded the root.exe file for Visual Studio 2019 from the website, after downloading and running the installer, is there anything else I need to do?
Just calling C:\root_v6.26.04\bin\thisroot.bat before compiling and most importantly before running your application. Do you have any error when building your application? Can you copy and paste exactly what you’re doing (like I did)?
C:\Users\Michael\OneDrive \Desktop\RootTest>cl -EHsc -Zc:__cplusplus -std:c++17 rootTest.cxx -I C:\root_v6.26.04\include /link -LIBPATH:C:\root_v6.26.04\lib libCore.lib libGui.lib libHist.lib
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30145 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
rootTest.cxx
Microsoft (R) Incremental Linker Version 14.29.30145.0
Copyright (C) Microsoft Corporation. All rights reserved.