My apologizes in advance, because this subject has been already discussed in previous talks “here” and “here 2”, but I did not really understand what might be wrong in my case. First, I made a macro and then compiled with CINT as “.L macros/CSpec.C++” but in order to make it cleaner and add other features I would need to go for a compiled version.
You can find in attachment an example of something that I want to do:
- Draw a TCanvas
- Run an AddExec on it without to quit
In order to compile and produce the executable:
The AddExec is just supposed to draw a vertical under the mouse cursor when typing “b”.
As I red in previous talks, I declared the function as static void myexec(), but when I try to interact with the TCanvas, I get the following error:
input_line_82:2:3: error: use of undeclared identifier ‘myexec’
I also tried to remove the line:
and modify the function void exec() as:
in order to make the job of AddExec, but it cannot interact with the TCanvas and nothing happens.
Any comments and ideas are very welcome.