I am using Visual Studio 2019 and ROOT version 6.18/04. I recently installed Python development tools in VS which installed Python to my PC. However after doing this, my ROOT programs have stopped working and VS returns the errors:
1>C:\root\include\ROOT\RWrap_libcpp_string_view.h(429,34): error C2039: ‘__find_end’: is not a member of ‘std’
1>C:\root\include\ROOT\RWrap_libcpp_string_view.h(125): message : see declaration of ‘std’
1>C:\root\include\ROOT\libcpp_string_view.h(193,9): warning C4068: unknown pragma
I don’t know whether the cause of this has anything to do with my Python installation or a Windows Update but my ROOT programs are now not working on two computers that I installed Python on via the Python development tools in VS. The error occurs in simple ROOT programs compiled in VS aswell such as:
#include <TApplication.h>
#include <TF1.h>
#include <TRandom3.h>
int main(int argc, char** argv)
{
TApplication theApp("App", &argc, argv);
TF1* f1 = new TF1("f1", "sin(x)/x", 0, gRandom->Rndm() * 10);
theApp.Run();
return 0;
}
I have tried running the programs on my laptop which had no Python installation and it worked fine.
Also I have attempted to uninstall Python on one of the computers but the problem still remains.
Any advice would be appreciated.
_ROOT Version: 6.18/04 Platform: Windows 10 Compiler: Visual Studio
Well, I have python installed on my computers and have no problem with ROOT… The only difference is that I installed Python stand-alone (i.e. not the Python development tools in VS)
I’ll try and let you know
Okay, thank you. I haven’t been able to fix the problem but this has happened on 2 computers that I had installed Python on via the development tools in VS. I have now uninstalled Python and removed as many traces of Python as I can find and even removed VS and reinstalled it a few times but nothing has worked for me.
I have a laptop that works fine however without the install on it. My guess is that something in VS is the problem.
I am very sorry. I forgot to mention something. When I built ROOT on Windows, it showed 1 error and it was a linker error for python (something related to x64 and x86, since my python version installed was x64). Before building, I installed the pre-compiled binary root_v6.18.04.win32.vc16.debug.exe and then also, the same error was displayed. Here is the build log:
1>------ Build started: Project: TestProject, Configuration: Debug Win32 ------
1>TestProject.cpp
1>C:\ROOT\root-6.18.04\include\ROOT\RWrap_libcpp_string_view.h(428,34): error C2039: '__find_end': is not a member of 'std'
1>C:\ROOT\root-6.18.04\include\ROOT\RWrap_libcpp_string_view.h(125): message : see declaration of 'std'
1>C:\ROOT\root-6.18.04\include\ROOT\libcpp_string_view.h(193,9): warning C4068: unknown pragma
1>Done building project "TestProject.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Is the precompiled binary also compiled with python?
I am trying with 32 bit python. Also, is there any way to make to ROOT build process a little less demanding on the memory? My laptop is not high-end. I can let the build process happen as long as it takes but I want to be able to use my laptop to do other things. I am using cmake-gui.