Hi,
I have written a script named hello.cc
#include<iostream>
using namespace std;
int hello()
{
cout<<"Hello everybody!!"<<endl;
return 0;
}
Then I want to load it with the command:
.L hello.cc+
Some errors have been shown:
Info in <TWinNTSystem::ACLiC>: creating shared library C:\root\macros\hello_cc.dll
Warning in <ACLiC>: Failed to generate the dependency file for C:\root\macros\hello_cc.dll
28136277_cint.cxx
hello_cc_ACLiC_dict.cxx
'bindexplib' is not recognized as an internal or external command
Error in <ACLiC>: Compilation failed!
.
The routine I used was as follow:
C:>"C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
C:>"C:\root\bin\root.exe"
.
It seems the root can use VC compiler. But what is [color=#0000FF]bindexplib[/color]?
I don’t know whether this is right.
Thanks
Peng
Hi Peng,
[quote=“darkblue369”]The routine I used was as follow:
C:>"C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
C:>“C:\root\bin\root.exe”
.
It seems the root can use VC compiler. But what is bindexplib?[/quote]
bindexplib.exe is an utility extracting the symbols from object files and it is located in $ROOTSYS/bin. If it is not found, that means your environment is not properly set up. You must call (run) C:\root\bin\thisroot.bat before starting root.exe (and then you don’t even need to give its full path).
Cheers, Bertrand.
[quote=“bellenot”]Hi Peng,
[quote=“darkblue369”]The routine I used was as follow:
C:>“C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat”
C:>“C:\root\bin\root.exe”
.
It seems the root can use VC compiler. But what is bindexplib?[/quote]
bindexplib.exe is an utility extracting the symbols from object files and it is located in $ROOTSYS/bin. If it is not found, that means your environment is not properly set up. You must call (run) C:\root\bin\thisroot.bat before starting root.exe (and then you don’t even need to give its full path).
Cheers, Bertrand.[/quote]
Hi Bertrand,
Thanks for your reply. I have tried your way. The routine I used was as follow this time:
C:>"C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
C:>"C:\root\bin\thisroot.bat"
C:>"C:\root\bin\root.exe"
The problem is as same as before:
Info in <TWinNTSystem::ACLiC>: creating shared library C:\root\macros\hello_cc.dll
Warning in <ACLiC>: Failed to generate the dependency file for C:\root\macros\hello_cc.dll
28136277_cint.cxx
hello_cc_ACLiC_dict.cxx
'bindexplib' is not recognized as an internal or external command
Error in <ACLiC>: Compilation failed!
Do I need to rewrite the content of the thisroot.bat? The attach is the thisroot.bat file. Sorry I have to change it to txt file.
Thanks.
Peng
thisroot.bat.txt (284 Bytes)
Hi Peng,
OK, could you make sure that ROOTSYS is defined?
For example, for you, it should give:
C:\>echo %ROOTSYS%
C:\root
Then, make sure that:
- C:\root\bin is in your PATH (type “echo %PATH%”),
- bindexplib.exe is in C:\root\bin,
- you can call it from the command line:
C:\>bindexplib
Usage: bindexplib ?-o outfile? ?-f(ull)? <dllname> <object filenames> ..
Cheers, Bertrand.
Hi Bertrand,
The following is what I type in the cmd.exe:
C:>"C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
C:>C:\root\bin\thisroot.bat
C:\>echo %ROOTSYS%
C:\root
C:\>echo %PATH%
C:\root\bin;C:\Program Files\Microsoft F#\v4.0\;...
C:\>bindexplib
Usage: bindexplib ?-o outfile? ?-f(ull)? <dllname> <object filenames> ..
Then I call the root.exe
C:>C:\root\bin\root.exe
Then compile the hello.cc.
.L hello.cc+
This time it seems right now.
But I have another question. Do i always need to type these steps to compile my codes?
Thanks.
Peng
Dear Peng,
[quote=“darkblue369”]This time it seems right now.[/quote]Good news!
[quote=“darkblue369”]But I have another question. Do i always need to type these steps to compile my codes?[/quote]Well, no, you can create a shortcut having as target (example for 32bit):
Then set ROOTSYS in the Environment Variables, and add %ROOTSYS%\bin in the PATH (still in the Environment Variables)
Cheers, Bertrand.
Hi Bertrand,
Sorry I don’t know how to set ROOTSYS in the Environment Variables, and add %ROOTSYS%\bin in the PATH.
Could you tell me how to do this?
Thanks
Peng
See for example this page, and replace TEMP by ROOTSYS
Cheers, Bertrand.
Hi Bertrand,
Thanks. I got it.
Best regards
Peng