Slot DoDraw() does not exist compiled guide

Hi Dr. Kolev,

I apologize for the incomplete answer given above. I believed that your issue is related to the build configuration. However, there is more to it.

Now that we clarified the build steps, let us look at the code itself. According to an example in the documentation for Standalone Version, Writing a GUI we have to do the following (refer to the example2b option):

  • Uncommented ClassDef(MyMainFrame, 0) macro in definition of your MyMainFrame class.
  • Split MyMainFrame class definition and implementation into separate *.h and *.cpp files.

It turns out that both above criteria are required for the stand-alone version to work correctly. I have modified your program code to satisfy the above requirements. Please download the archive with your code below. I’m attaching the example with CMake project generator. Please note that even though the number of source and header files was changed in the project, CMakeLists.txt remains the same. It automatically builds corresponding lists of files by searching in the project folder. I favor CMake project generator option over the GNU Makefile because it comes with more possibilities.

kolev-gui.zip (3.5 KB)

Please let me know if this resolves your issue. Also please mark this post as “Solution” if everything works out well.

P.S. @kolev20n, I’ve added a minor fix to your code that correctly terminates ROOT event loop when the main GUI window is closed. Method is implemented in MyMainFrame::Exit(). You can find similar code in ROOT GUI examples.

Also it seems that correct location for the *rdict.pcm file is not in dynamic library search path, but /usr/local/bin instead. So I had to fix that in CMakeLists.txt