Hi All,
I am relatively new to ROOT, and seem to be having some issues relating to the ROOT filesystem setup. I am trying to create a data structure for anaylsing tests run on a pixel sensor chip, I am thinking each pixel could be represented by a branch, storing position and threshold data etc, but before I can work on this I am encountering a more fundamental issue, I cannot instnatiate an Event class. This is because my installation cannot find the /test folder in which the required header files are contained. I am using ROOT 5.34.36 on windows 7 64 bit, and have configured my Environment variables to include a $ROOTSYS. I am using the code below (as found in one of the tutorial macros) to call the include files (currently starting with $ROOTSYS, I have also tried the full address on disk to no avail).
My current āVariable Valueā for ROOTSYS is C:\root_v5.34.36, it had previously been set to C:\root_v5.34.36\bin, with exactly the same errors resulting.
Itās just the standard installation directory, contains both the /bin and /test folders needed for those header files, as well as all macros and tutorials etcā¦
OK, glad Iām not going completely mad! I set my $ROOTSYS just using windows advanced system settings, do I need to edit thisroot.bat to contain the path also?
Edit: I can find the Event.h file in test no problem, but cannot find any file called libEvent (format .so or otherwise) anywhere in the ROOT directory, is this normal and the file is created by the program as an when needed? I have also tried simply using #include "$ROOTSYS\test\Event.h" with no luck.
Edit 2: I can navigate to %ROOTSYS% in cmd and show all files using dir (is the $ only meant for use on unix systems?), but ROOT still cannot find files in this directory, even with the macro adjusted to use %ROOTSYS% instead of $ROOTSYS
I downloaded the binary. Trying the cmd I get ānmake is not recognised as an external program command or batch fileā, Iāll get back to you on the cygwin method, I need to configure my cygwin properly so make works.
Cheers!
Got cygwin working properly but the problem persists.
Cygwin terminal output:
$ cd $ROOTSYS/test; make
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
/cygdrive/c/root_v5.34.36/bin/root-config: line 420: test: command: integer expr ession expected
cl.exe -O2 -nologo -IC:/root_v5.34.36/include -FIw32pragma.h -MD -GR -GX -G5 -I 'C:\root_v5.34.36\include' -c Event.cxx
make: cl.exe: Command not found
make: *** [Makefile:836: Event.obj] Error 127
Hi Axel,
Iāve tried using both / and \ delimiters, I was pretty confused as to whether root running in windows requires windows style paths, and it seems so as using / results in an arithmetic (divided by zero) error. The AddIncludePath functions seem promising but suffer from exactly the same issue as the includes in my macro, root canāt āseeā the windows paths it seems. Use of paths starting with %ROOTSYS% or %ROOTSYS result in syntax errors (fine, root wants use of $ROOTSYS) However using this correct syntax still results in could not open file errors.
Is it likely a clean install of ROOT would help, would it be advantageous to compile it myself as opposed to downloading the binaries?
Having installed visual studio properly (why nmake wasnāt working, clearly) and clean installing Root (again from binaries) I am unable to run nmake in the test directory with the error (from VS command prompt)
C:\root_v5.34.36\test>nmake
Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
Copyright (C) Microsoft Corporation. All rights reserved.
makefile(10) : fatal error U1033: syntax error : '=' unexpected
Stop.
With line 10 of the makefile being
RC := root-config
The MSDN documentation for this error states "If a macro definition in the makefile contained an equal sign (=) without a preceding name or if the name being defined is a macro that expands to nothing, the following error occurs:"
So Iām assuming the problem lies in the fact that root-config āexpands to nothingā? Does this need to be edited in order to work properly?
So close to working now! This results in error U1052 (win32.mak not found). Searching over my entire C: drive it seems like Microsoft have stopped bothering to include it in new releases of VS (Iām using the newest one) but I think (hope) installing windows SDK should sort it.
This is because youāre using a version of Visual Studio which is not supported (too recent one). You cannot use a version more recent than Visual Studio 2012 (and it has to match the version used to build ROOT anywayā¦)
OK cheers for the heads up, foolish of me to assume microsoft having decent backward compatability . Certainly learning why scientists prefer unix!
Finally got everything building! Thank you everyone for the help, Iām so much more enlightened now about the backdoor OS-related stuff to programming that was never touched in my prior Java coding classes!