[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] compile gnuradio in cmake
From: |
ruiy |
Subject: |
[Discuss-gnuradio] compile gnuradio in cmake |
Date: |
Sat, 3 Mar 2018 13:02:23 +0800 |
I am trying to compile gnuradio by cmake. I have writen the CMakeLists to compile my program.
It can work when I don't use qtgui. But a error occur when I use qtgui. The error is exit code 139 which showed in the picture following. I cannot understand what happen.
CMakeLists.txt:
cmake_minimum_required(VERSION 3.9)
project(TestQtGui)
set(CMAKE_PREFIX_PATH /home/calt/Qt5.9.4/5.9.4/gcc_64)
find_package(Qt5Widgets)
find_package(Qt5Core)
find_package(Qt5Gui)
find_package(Boost "1.35" COMPONENTS filesystem system)
set(GR_REQUIRED_COMPONENTS QTGUI)
find_package(Gnuradio "3.7.2" REQUIRED)
include_directories(
${GNURADIO_ALL_INCLUDE_DIRS}
)
set(SOURCE_FILES main.cpp)
add_executable(TestQtGui ${SOURCE_FILES})
target_link_libraries(TestQtGui Qt5::Widgets
Qt5::Gui
${Boost_LIBRARIES}
${GNURADIO_ALL_LIBRARIES})
main.cpp:
#include <gnuradio/top_block.h>
#include <gnuradio/qtgui/time_sink_f.h>
int main() {
int rate = 48000;
gr::top_block_sptr tb = gr::make_top_block("testQtGui");
gr::qtgui::time_sink_f::sptr t_bk = gr::qtgui::time_sink_f::make(1024, rate, "", 1);
}
errors:
home/calt/workspace/TestQtGui/cmake-build-debug/TestQtGui
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Pictures:
I can't understand what cause the exit code 139. Any wrong with my cmakelists.txt?
I will appreciate it If you can solve. Thank you very much.
- [Discuss-gnuradio] compile gnuradio in cmake,
ruiy <=