5

How do I find out the version of GNU Radio that I have installed?

I would like the use their messaging libraries, but they are available on newer versions of gnuradio only and for some reason I'm getting a compilation error when I try to use the following code:

message_port_register_out(pmt::mp("out_message"));

I get the following error on compilation:

error: ‘message_port_register_out’ was not declared in this scope

It's supposed to be part of the gr_basic_block, which all blocks inherit from, but it's not compiling.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
jortiz81
  • 539
  • 2
  • 8
  • 20

3 Answers3

11

You can get the version number using python.

from gnuradio import gr
gr.version()
Ben Reynwar
  • 1,547
  • 14
  • 21
8

If you installed the complete package - not only the library - in a terminal window:

$ gnuradio-companion --version

GNU Radio Companion 3.7.2.1

or

$ gnuradio-config-info --version
3.7.2.1
jcoppens
  • 5,306
  • 6
  • 27
  • 47
  • I'm not aware of any distribution that would offer the GNU Radio library without gnuradio-config-info, but I do believe that such exists. Can you enlighten me on where that happens? – Marcus Müller Aug 10 '15 at 19:45
  • Wow, this was a year ago! I believe I meant that gnuradio-companion might not always be available. That's what the reply said too: The idea is that the library is always available, but not always grc. It's been a while, but I believe grc *can* be disabled from `configure` – jcoppens Aug 10 '15 at 22:22
0

According to the docs, message_port_register_out is a member of gr_basic_block. Based on the compilation error you have posted and the code snippet, I'd assume you need an instance to work with. It's hard to tell without more context however.

  • Well, what about the first part of the question. How do I find out the version of gnuradio i have installed? – jortiz81 May 15 '13 at 00:59
  • It's written in the constructor of a source block. – jortiz81 May 15 '13 at 01:02
  • Not knowing much about your particular system setup, the best I could offer is a find command. Something like `find /usr/lib -name 'lib*radio*` - this should yield you some result like libgnuradiosomething.so.3.61 or something similar. Sorry I can't be more precise here. Also check /usr/local/lib –  May 15 '13 at 01:07