Nikoo
October 29, 2019, 11:01am
1
I have created ROOT based project with CMake. When I run the program Canvas window is not opened. However, when I save the canvas c1->SaveAs(“test.png”) it saves correctly.
So how to make canvas to be opened?
CMakeList.txt
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(untitled1)
list(APPEND CMAKE_MODULE_PATH $ENV{ROOTSYS}/etc/cmake)
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
find_package(ROOT REQUIRED COMPONENTS RooFitCore)
include_directories(${CMAKE_SOURCE_DIR} ${ROOT_INCLUDE_DIRS})
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
add_executable(untitled1 main.cpp ${sources} ${headers})
target_link_libraries(${PROJECT_NAME} ${ROOT_LIBRARIES})
ROOT Version: ROOT 6.14/04
Platform: Ubuntu 18.04.3 LTS
Compiler: gcc version 7.4.0
couet
October 29, 2019, 12:45pm
2
Does your program use TApplication ?
A bit like:
// @(#)root/main:$Id$
// Author: Fons Rademakers 02/03/95
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
//////////////////////////////////////////////////////////////////////////
// //
// RMain //
// //
// Main program used to create RINT application. //
// //
//////////////////////////////////////////////////////////////////////////
#include "TRint.h"
This file has been truncated. show original
1 Like
system
Closed
November 12, 2019, 3:33pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.