Message: Re: Problem adding Geant4 into QT Creator Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: Problem adding Geant4 into QT Creator 

Forum: Installation and Configuration
Re: Question Problem adding Geant4 into QT Creator
Date: 30 Jul, 2018
From: Ben Morgan <Ben Morgan>

On Sun, 29 Jul 2018 07:03:01 GMT, yehudazy wrote:
> Hi, I'm trying to combine Geant4 with QTWidget using the QT Creator. im
> using a simple example of "hello world" which works on its own. But when
> adding Geant packeage and link libraries into the cmakefiles.txt the
> program crushes.
> 
> please see my code and debug information, maybe someone can help :-)
> 
> //************************************
> 
> //main.cpp
> 
> #include "mainwindow.h"
> 
> #include 
> 
> int main(int argc, char * argv[]);
> 
> {
> 
> QApplication a(argc, argv);
> 
> MainWindow w;
> 
> w.show();
> 
> return a.exec();
> 
> }
> 
> //************************************
> 
> //Cmakefiles.txt
> 
> cmake_minimum_required(VERSION 2.8.2)
> 
> project(helloworld)
> 
> set(CMAKE_INCLUDE_CURRENT_DIR_ON)
> 
> set(CMAKE_AUTOMOC ON)
> 
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wall")
> 
> find_package(Qt5Widgets REQUIRED)
> 
> qt5_wrap_ui(UI_HEADERS mainwindow.ui)
> 
> qt5_add_resources(QRCS resources.qrc)
> 
> //**Additional code lines for adding geant4
> 
> find_package(Geant4 REQUIRED)
> 
> add_executable(helloworld $(Geant4_LIBRARIES) Qt5::Widgets)
> 
> //*************************************
> 
> //(gdb) where
> 
> #0 0x00007fffecc57264 in__memcpy_ssse3_back() at /usr/lib64/libc.so.6
> #1 0x00007ffff3d85f5b in QByteArray::append(char const*)() at /usr/lib64/libQtCore.so.4
> #2 0x00007ffff5855681 in qRegisterWidgetsVariant()()at /usr/lib64/libQtWidgets.so.5
> #3 0x0007ffff7dec1e3 in _dl_init_internal() at /lib64/ld-linux-x86-64.so.2
> #4 0x0007ffff7dde21a in _dl_start_user() at /lib64/ld-linux-x86-64.so.2
> #5 0x0000000000000001 in ()
> #6 0x0007ffffffd82 in ()
> #7  0x0000000000000000 in ()
> 
> Thanks.
> 

Whilst this appears to be a build issue, it may be worth posting this on the Visualization Forum as it relates more to the coupling of Geant4 to Qt and vice versa.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Problem adding Geant4 into QT Creator   (batiar - 20 Sep, 2018)
 Add Message Add Message
to: "Re: Problem adding Geant4 into QT Creator"

 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 ]