I am new to ROOT & CINT.
I have downloaded ROOT v6.04.02 tar file and followed the below steps in Ubuntu 14.04
cd root
.configure
make
make install
ROOT is installed successfully after installing many dependency library.
My requirement is to use cint with QT. So i followed the steps given in ftp://root.cern.ch/root/doc/26ROOTandQT.pdf
After the above step i have done the make qtcint. This was not working. Am getting the following issue.
make: *** No rule to make target ‘qtcint’. Stop
Please guide me how can i solve this issue. And please let me know what are the steps i need to do for a simple QT application which uses the CINT. Am using QT 5.5 which has already installed in my system before ROOT installation. I have also installed CINT package separately from root.cern.ch.
Please let me know how i can use CINT in QT Application.
I have build ROOT using ./configure --enable-qt also.
But still am getting the same issue.
Initially i have installed ROOTv5.34.32 (ROOT 5). There i got some issue while giving the command
make qtcint. When i searched in net i got that ROOT5 will not support and ROOT 6 will support. sft.its.cern.ch/jira/browse/ROOT-6863
So i have installed ROOT 6.
Please let me know how i can use CINT in QT application.
Sorry - this is outside the support I can give. Your question really is “how can I build a Qt application that links to other libraries”? I think you’ll find plenty of help in the 'net, e.g. on Qt’s forum. This has nothing to do with ROOT, except for the fact that you create a TRint.
Note that you are talking about "Qt-ROOT".
This is an external source code which is (was?) maintained by Valeri Fine.
You can have a look here: sourceforge.net/p/qtroot/wiki/Home/
I believe it used to be ROOT 5 + QT 4 specific and I’m not sure if it works with ROOT 6.
Thanks, Now at least am able to add libCint.so to QT Application and pass script.cxx or .cpp file to cint. But still i do have the qtcint.so issue for qt examples.
I want to build CINT package using Qt in Linux ubuntu 14.04.
I tried to add a new Qt Lib application and added all CINT package (cpp and .h file and included the path)
When i tried to build am getting error with Platform dependent macros. Like G__WIN32, G__P ect.
Please let me know where am going wrong. Is it possible to build CINT package in Linux Ubuntu 14.04 using QT
I am trying to export a C++ function / class and call the exported function from a script file. I have passed this script file to CINT. am getting the following issue.
I am trying in Ubuntu 14.04. With out cint my application able to execute the exported function.
[color=#BF0080]Error: Function module_init() is not defined in current scope FILE:/home/workingDir/script.cxx LINE:4
!!!Dictionary position rewound… !!!Error recovered!!!
Error: Function module_init() is not defined in current scope FILE:/home/Priya_workingDir/script.cxx LINE:4
!!! return from main() function[/color]
Following are my samples:
// My sample.h file contains #if defined _WIN32 || defined CYGWIN || defined MINGW32 #ifdef BUILDING_DLL #ifdefGNUC #define DLL_PUBLIC attribute ((dllexport)) #else #define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. #endif #else #ifdefGNUC #define DLL_PUBLIC attribute ((dllimport)) #else #define DLL_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax. #endif #endif #define DLL_LOCAL #else #ifGNUC >= 4 #define DLL_PUBLIC attribute ((visibility (“default”))) #define DLL_LOCAL attribute ((visibility (“hidden”))) #else #define DLL_PUBLIC #define DLL_LOCAL #endif #endif
extern “C” DLL_PUBLIC int module_init(); // exporting one function
Please let me how i can export a function / class from a c++ class and call the exported function / class from a script which i will be passing to G__init_cint( cint script.cxx) in linux.
This is a lot easier with cling: you create a cling::Interpreter object (possibly passing a few “-I/some/include/dir”) and interp.declare("#include “sample.h”") and then you just call whatever you want using interp.evaluate(“whatever()”).
No dictionaries, no qtcint, no need to hide things; you can just #include the actual header.
But currently in Windows we are using CINT as our interpreter. And we are trying the same to work in Linux.
In windows am using __declspec (dllexport) to export a class/ function and execute the exported functions thru CINT by passing the script files.we can able to achive this in windows.
Same way i tried for Linux using attribute((visibility( default ))) and attribute((dllexport)). When i pass the script file to CINT it gives function or class object is not defined in current scope.
Please let me know is it possible in Linux with CINT. If possible , please let me know where am doing wrong.
I am able to export a function from a class and invoke from another script which am passing to CINT.
But am not able to use integer variable. It gives some error like
[color=#BF4000]Limitation : dec,oct,hex and am getting warnings like not fount G__CINT_ENDL , G__CINT_HEX, G__CINT_DEC ect… refered in __iostream.[/color]
Am able to use other data types. Like long double char ect…
For Example
in my script file #include backend.h #include backend.cpp
main()
{
fun(10,10); // am calling my backend function from my script
fun1(10,10);
}
my Backend.cpp code
void backend::fun(int a,int b)
{
cout << Given value << a << b << endl;
int c = a * b;
cout << output << c << endl;
}
void backend::fun1(long a,long b)
{
cout << Given value << a << b << endl;
long c = a * b;
cout << output << c << endl;
}
passing the above script.cpp to G_INIT_CINT(cint script.cpp);
Am getting output like
Given value
output
Given value 10 10
output 100
Issue is integer values are not printing.
Please let me know what i need to do to resolve the integer issue.
I am also facing the same issues as jag reported like below error.
Error: Function module_init() is not defined in current scope FILE:/home/workingDir/script.cxx LINE:4
!!!Dictionary position rewound… !!!Error recovered!!!
Jag, can please tell me how it got resolved in your case.
Please help me if anyone else also face the same issue.