Hi Karin,
[quote=âkarineklundâ]I am sorry, but I am confused and I donât understand.[/quote]Thatâs my fault, Iâll explain things a bit more detailed now.
[quote=âkarineklundâ]I added the ROOTSYS in enviroment variables (C:\root since this is where I have root, but should it not be root\bin or lib or something?).[/quote]Where did you add it? In the control panel / system? Good. It should point to C:\root - not C:\root\bin.
[quote=âkarineklundâ]But what is the compiler I use with .L?[/quote] Itâs the one used to build root - they have to be compatible. So in your case thatâs called âclâ. ROOT needs to be able to find that compiler, thatâs why it has to be in the %PATH% (the windows version of $PATH). And to get it there you can either edit your PATH environment variable (just like you did for ROOTSYS) - but then youâll also have to add LIB and INCLUDE, which are needed by the compiler. Or you run the âVisual Studio Command Promptâ, which is just a âwindows shellâ, but with the proper environment variables set.
[quote=âkarineklundâ]I have gcc and it seems to be working. Good enough?[/quote]Depends on what ROOT build youâre using. Use the Microsoft compiler with the win32 build, and gcc with win32gcc. The first one is the official windows build.
[quote=âkarineklundâ]Should I write .h or .h+? If I write .h+ I get:
root [0] .L TVoxel.h+
Info in <TWinNTSystem::ACLiC>: creating shared library C:\karin\TVoxel_h.dll
'cl' is not recognized as an internal or external command,
operable program or batch file.
Internal error: G__copytotmpfile() 2
FILE:C:\DOCUME~1\ked\LOCALS~1\Temp/\s244._rootcint.h LINE:0
Error: cannot open file "C:\DOCUME~1\ked\LOCALS~1\Temp/\s244._rootcint.h" FILE: LINE:0
!!!Removing C:\karin\sh8_.cxx C:\karin\sh8_.h !!!
Error: rootcint: failed to open C:\karin\sh8_.cxx in ReplaceBundleInDict()
'cl' is not recognized as an internal or external command,
operable program or batch file.
Error in <ACLiC>: Compilation failed!
[/quote]Thatâs because the compiler is not in your PATH - you didnât start root from within a Visual Studio Command prompt. Alternatively, you can start a regular command prompt, and run C:\Program Files\Microsoft Visual Studio 7\Common7\Tools\vsvars.bat before running root - that will set the environment variables.
[quote=âkarineklundâ]If I write .h it does not complain until I get to actually running testRun(), and then it says:
Error in <TBranchElement::GetDataMemberOffset>: obsolete call with (TVoxel,fUniqueID)
[...]
Error: C++ exception caught FILE:C:\karin\runTest.C LINE:22
(Int_t)0
*** Interpreter error recovered ***
[/quote]Right, I/O of interpreted classes is not supported yet. Youâll have to compile TVoxel etc, e.g. by loading it as â.L TVoxel.h+â.
[quote=âkarineklundâ]But, then again, what I really want to do is to use VS c++ to write and run my root on windows. I have read your page about it, but beeing not only a beginner with root, I am even more so with VS, so I havnât really managed to get that to work yet either. This will be my next step.[/quote]Let us know if you run into problems.
Cheers, Axel.