Message: Re: How to compile examples with cmake and Qt support? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: How to compile examples with cmake and Qt support? 

Forum: (Graphical) User Interfaces
Re: Question How to compile examples with cmake and Qt support? (Mojca Miklavec)
Re: Feedback Re: How to compile examples with cmake and Qt support? (Ben Morgan)
Date: 18 Jul, 2011
From: Mojca Miklavec <Mojca Miklavec>

On Sun, 17 Jul 2011 21:37:10 GMT, Ben Morgan wrote:
> Hi Mojca,
> 
> On Thu, 14 Jul 2011 17:56:41 GMT, Mojca Miklavec wrote:
> > it compiles fine and runs, but I don't get any Qt interface. It just prints out some initalizations and quits. What am I missing?
> 
> I suspect that it's missing the G4VIS_USE and G4UI_USE definitions,
> which are used in that example to protect the inclusion of the
> UI/VISExecutive setup classes in exampleN02.cc .
> 
> If you modify your CMakeLists.txt to
> 
> cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
> project(exampleN02)
>  
> find_package(Geant4 REQUIRED COMPONENTS qt)
> include(${Geant4_USE_FILE})
> add_definitions(-DG4UI_USE -DG4VIS_USE)

Thank you very much. This additional line works OK for me.

> GEANT4_COLLATE_APPLICATION_SOURCES(EXAMPLEN02_SOURCES)
>  
> add_executable(exampleN02 ${EXAMPLEN02_SOURCES})
> target_link_libraries(exampleN02 ${Geant4_LIBRARIES})
> 
> that should add the needed definitions and the Qt UI/Vis should run.

(According to the other reply I hope that these files will become part of Geant4 by the time of official release of 9.5.)

Thank you,
    Mojca

 Add Message Add Message
to: "Re: How to compile examples with cmake and Qt support?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]