# Code::Blocks

**URL:** <https://www.ruby-forum.com/t/code-blocks/240415>\
**Category:** GNU Radio\
**Created:** [April 13, 2014, 12:37am UTC](https://www.ruby-forum.com/t/code-blocks/240415 "2014-04-13T00:37:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 13, 2014, 12:37am UTC](https://www.ruby-forum.com/t/code-blocks/240415/1 "2014-04-13T00:37:49Z")

</div>

Greetings everybody,

I have been using Code::Blocks IDE for a while. And I have tried to link  
GnuRadio in Code:Blocks,  
but I have not found any “.so” file in Ubuntu, although I have searched  
via terminal with the command  
“locate”.

I have read the tutorial in the web  
page:[http://gnuradio.org/redmine/projects/gnuradio/wiki/UsingCB&](http://gnuradio.org/redmine/projects/gnuradio/wiki/UsingCB&)  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules)

I would like to ask you, if it would be possible to link GnuRadio  
libraries in Code::Blocks IDE with  
a file with extension “.so” ?

I would be gald if you could reply my email.

Thanks in advance,  
Abdullah

---

<div class="post-metadata">

**Author:** ![abdullah\_unutmaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@abdullah\_unutmaz](https://www.ruby-forum.com/u/abdullah_unutmaz)\
**Post date:** [April 13, 2014, 8:11am UTC](https://www.ruby-forum.com/t/code-blocks/240415/2 "2014-04-13T08:11:09Z")

</div>

Greetins everybody,

In my previous message, I said I had found no no .so file :).

I would like to ask you, especially to use usb/ethernet communication  
functions of gnuradio,  
which .so file I would need to link in Code::Blocks.

Thanks in advance,  
Abdullah

On Saturday, April 12, 2014 6:36 PM, abdullah unutmaz  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

Greetings everybody,

I have been using Code::Blocks IDE for a while. And I have tried to link  
GnuRadio in Code:Blocks,  
but I have not found any “.so” file in Ubuntu, although I have searched  
via terminal with the command  
“locate”.

I have read the tutorial in the web  
page:[http://gnuradio.org/redmine/projects/gnuradio/wiki/UsingCB&](http://gnuradio.org/redmine/projects/gnuradio/wiki/UsingCB&)  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules)

I would like to ask you, if it would be possible to link GnuRadio  
libraries in Code::Blocks IDE with  
a file with extension “.so” ?

I would be gald if you could reply my email.

Thanks in advance,  
Abdullah

---

<div class="post-metadata">

**Author:** ![abdullah\_unutmaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@abdullah\_unutmaz](https://www.ruby-forum.com/u/abdullah_unutmaz)\
**Post date:** [April 13, 2014, 8:22am UTC](https://www.ruby-forum.com/t/code-blocks/240415/3 "2014-04-13T08:22:57Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi Abdullah,

Now I’m even more confused.  
GNU Radio has no USB or Ethernet functionality at all (It has network  
blocks, but they don’t have anything to do with ethernet level – they  
just use your operation system’s sockets and don’t care about ethernet  
at all).

Modern GNU Radio builds are split up in several libraries  
(gnuradio-runtime, gnuradio-audio,…). You can usually find these  
using “pkg-config --libs gnuradio-runtime”

So, but one step back:  
What do you want to do? Build an out-of-tree module? In that case,  
Code::blocks should work fine with the CMake build system which is  
usually used to build such modules. That will find the necessary  
libraries, linker options and so on for you.

Linking against a shared library alone does not really help you, you  
need to know which symbols are in that library. You usually do that by  
including specific .h describing the functionality. If you know what  
headers you want, you usually know which library to link against.

Greetings,  
Marcus

On 13.04.2014 08:09, abdullah unutmaz wrote:

> I have read the tutorial in the web page:  
> Thanks in advance, Abdullah
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Discuss-gnuradio  
> mailing list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTSizzAAoJEBQ6EdjyzlHt+0gH/iRMpVhXdYvPe+vYNbkM/OPA  
ZtimSau9P84Yo+wApa+J84n2Lb7jIaeCwckHd2FLhpuw8GYB9C49qggPiGqEO3Lb  
ItwgTPKh7wFCRssH8IstpI7fR72GrdpoyMUUJtMmPdBi4YHvr3emCIi0ZZjKqfTb  
osj2CuwNpFRd9nsIXFHpIq5lb4lOvhwdtlhMgYIeeYxI0Htg0xxV3/2C/KHFksCO  
q92kawC1l4D0KIKginoF59KjkFiK9pUY1c9MDzCjwqynsNIYT4SZz+pESRvBbFI3  
hh80UD7SoKxML33u813hXY5ynpTpXYF4IRDRypXsqGq86XJDdnBE112nk6e8Ip0=  
=mOQ2  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![abdullah\_unutmaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@abdullah\_unutmaz](https://www.ruby-forum.com/u/abdullah_unutmaz)\
**Post date:** [April 13, 2014, 9:34am UTC](https://www.ruby-forum.com/t/code-blocks/240415/4 "2014-04-13T09:34:54Z")

</div>

Dear Marcus,

Firstly thank you for your time.

I want to use gnuradio with not only USRP kits but also other kind of  
devices which are  
connected via USBport or ethernet. I have developed python programs  
using gnuradio,  
but currently I am required to use C++, and I prefer to use  
Code::Blocks.

I have taken a look at the gnuradio files installed in a bit more  
details and seen I could use lots  
of gnuradio libraries by providing the link directory of the related .so  
files and header files.

But I have not seen any .so file related to uhd files of gnuradio. By  
the way, if I am not wrong,  
for example for an audio device which is connected via USB port could be  
accessible by  
using gnuradio-audio sink/source files.

Thank you,  
Abdullah

On Sunday, April 13, 2014 2:21 AM, Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi Abdullah,

Now I’m even more confused.  
GNU Radio has no USB or Ethernet functionality at all (It has network  
blocks, but they don’t have anything to do with ethernet level – they  
just use your operation system’s sockets and don’t care about ethernet  
at all).

Modern GNU Radio builds are split up in several libraries  
(gnuradio-runtime, gnuradio-audio,…). You can usually find these  
using “pkg-config --libs gnuradio-runtime”

So, but one step back:  
What do you want to do? Build an out-of-tree module? In that case,  
Code::blocks should work fine with the CMake build system which is  
usually used to build such modules. That will find the necessary  
libraries, linker options and so on for you.

Linking against a shared library alone does not really help you, you  
need to know which symbols are in that library. You usually do that by  
including specific .h describing the functionality. If you know what  
headers you want, you usually know which library to link against.

Greetings,  
Marcus

On 13.04.2014 08:09, abdullah unutmaz wrote:

> I have read the tutorial in the web page:  
> Thanks in advance, Abdullah
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Discuss-gnuradio  
> mailing list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTSizzAAoJEBQ6EdjyzlHt+0gH/iRMpVhXdYvPe+vYNbkM/OPA  
ZtimSau9P84Yo+wApa+J84n2Lb7jIaeCwckHd2FLhpuw8GYB9C49qggPiGqEO3Lb  
ItwgTPKh7wFCRssH8IstpI7fR72GrdpoyMUUJtMmPdBi4YHvr3emCIi0ZZjKqfTb  
osj2CuwNpFRd9nsIXFHpIq5lb4lOvhwdtlhMgYIeeYxI0Htg0xxV3/2C/KHFksCO  
q92kawC1l4D0KIKginoF59KjkFiK9pUY1c9MDzCjwqynsNIYT4SZz+pESRvBbFI3  
hh80UD7SoKxML33u813hXY5ynpTpXYF4IRDRypXsqGq86XJDdnBE112nk6e8Ip0=  
=mOQ2  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![abdullah\_unutmaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@abdullah\_unutmaz](https://www.ruby-forum.com/u/abdullah_unutmaz)\
**Post date:** [April 13, 2014, 9:53am UTC](https://www.ruby-forum.com/t/code-blocks/240415/5 "2014-04-13T09:53:47Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

… as long as you know how to use the functionality within, yes.  
But with only the library file, your compiler can’t say how the  
functions you want to use look like.

However, to repeat: GNU Radio has _no_ functionality to talk to any  
device. It wraps these functionalities offered by hardware drivers  
such as UHD (in the USRP case) or alsa (in the funcube  
dongle/soundcard case). If you have a USB device that’s not covered by  
the code supplied with GNU Radio you’ll need either another GNU Radio  
module to talk to these devices (e.g. osmosdr) or need to write your  
own driver.

When you developed python programs, you most probably did this in an  
out-of-tree module, didn’t you?  
That out-of-tree module has a build system based on CMake.  
You should use that, it sets library paths, include directories, cares  
for correct linking and installation and so on.  
CMake is nicely integrated in Code::Blocks. You should _not_ manually  
specify the library to link against but let the Build System figure  
that out for you.

Greetings,  
Marcus

On 13.04.2014 09:43, abdullah unutmaz wrote:

> details and seen I could use lots of gnuradio libraries by  
> On Sunday, April 13, 2014 2:21 AM, Marcus M.  
> (gnuradio-runtime, gnuradio-audio,…). You can usually find these  
> know what headers you want, you usually know which library to link
> 
> > In my previous message, I said I had found no no .so file :).  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:  
> > [http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules)  
> > Thanks in advance, Abdullah  
> > [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTSkJNAAoJEBQ6EdjyzlHth6MIAJrvrG2HA/7EOtgzj/3/dAZT  
it2aZSFUGtK/XRIxgWGseIInTyIUTjCijfWgAZInoKhd8eSI2IMG5Cjn612uac9B  
nQ7JFc/rPfHolclUNQ3ZqS92oPQbIkIj5RE+gXPEJ11PqzCgUlDEqyJo1kEUqay/  
cySYlu7Qt/gpiGyxl58BYXUNGpdj4YjXWqZbmP4bh5iEUH7UudL0AkYX9Xoz4Wap  
yGyI1rRl45cBGVh4Gba/yfeLGzF4GRyz6nqdpsP3Xty6Z4i/bl2t/luhmbYJjfCR  
yQjVfAuz/H9isSbeS6SLhG/NfIFYG0CoAJLWlQG+OC/sqSJ8fIMHX0JvCuAWzvs=  
=frd2  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![abdullah\_unutmaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@abdullah\_unutmaz](https://www.ruby-forum.com/u/abdullah_unutmaz)\
**Post date:** [April 13, 2014, 11:01am UTC](https://www.ruby-forum.com/t/code-blocks/240415/6 "2014-04-13T11:01:37Z")

</div>

Dear Marcus,

When I used python, I followed gr-extras and developed my own blocks.

I looked at gr-audio, and saw that it uses alsa, which probably  
prohibited my program, in which I used libusb,

to access my audio device for isochronous data acquisition; because I  
have taken LIBUSB\_ERROR\_IO…anyway…

I will probably use asoundlib.h,  
[http://www.linuxdevcenter.com/pub/a/linux/2007/08/02/an-introduction-to-linux-audio.html?page=2](http://www.linuxdevcenter.com/pub/a/linux/2007/08/02/an-introduction-to-linux-audio.html?page=2)  
, to acquire data; gnuradio would be useful especially with osmosdr like  
devices, but if I could  
access my audio device and other connected devices such as camera etc.  
gnuradio would be the best option

probably for a PC based application; at least I am more familiar with  
gnuradio.

Thanks,  
Abdullah

On Sunday, April 13, 2014 3:52 AM, Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

… as long as you know how to use the functionality within, yes.  
But with only the library file, your compiler can’t say how the  
functions you want to use look like.

However, to repeat: GNU Radio has _no_ functionality to talk to any  
device. It wraps these functionalities offered by hardware drivers  
such as UHD (in the USRP case) or alsa (in the funcube  
dongle/soundcard case). If you have a USB device that’s not covered by  
the code supplied with GNU Radio you’ll need either another GNU Radio  
module to talk to these devices (e.g. osmosdr) or need to write your  
own driver.

When you developed python programs, you most probably did this in an  
out-of-tree module, didn’t you?  
That out-of-tree module has a build system based on CMake.  
You should use that, it sets library paths, include directories, cares  
for correct linking and installation and so on.  
CMake is nicely integrated in Code::Blocks. You should _not_ manually  
specify the library to link against but let the Build System figure  
that out for you.

Greetings,  
Marcus

On 13.04.2014 09:43, abdullah unutmaz wrote:

> details and seen I could use lots of gnuradio libraries by  
> On Sunday, April 13, 2014 2:21 AM, Marcus M.  
> (gnuradio-runtime, gnuradio-audio,…). You can usually find these  
> know what headers you want, you usually know which library to link
> 
> > In my previous message, I said I had found no no .so file :).  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:  
> > [http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules)  
> > Thanks in advance, Abdullah  
> > [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTSkJNAAoJEBQ6EdjyzlHth6MIAJrvrG2HA/7EOtgzj/3/dAZT  
it2aZSFUGtK/XRIxgWGseIInTyIUTjCijfWgAZInoKhd8eSI2IMG5Cjn612uac9B  
nQ7JFc/rPfHolclUNQ3ZqS92oPQbIkIj5RE+gXPEJ11PqzCgUlDEqyJo1kEUqay/  
cySYlu7Qt/gpiGyxl58BYXUNGpdj4YjXWqZbmP4bh5iEUH7UudL0AkYX9Xoz4Wap  
yGyI1rRl45cBGVh4Gba/yfeLGzF4GRyz6nqdpsP3Xty6Z4i/bl2t/luhmbYJjfCR  
yQjVfAuz/H9isSbeS6SLhG/NfIFYG0CoAJLWlQG+OC/sqSJ8fIMHX0JvCuAWzvs=  
=frd2

-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![abdullah\_unutmaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@abdullah\_unutmaz](https://www.ruby-forum.com/u/abdullah_unutmaz)\
**Post date:** [April 13, 2014, 9:44am UTC](https://www.ruby-forum.com/t/code-blocks/240415/7 "2014-04-13T09:44:56Z")

</div>

Dear Marcus,

I have found libgnuradio-runtime.so file, I guess this will allow me to  
use entire gnuradio functionality in Code::Blocks.

Thank you,  
Abdullah

On Sunday, April 13, 2014 3:33 AM, abdullah unutmaz  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

Dear Marcus,

Firstly thank you for your time.

I want to use gnuradio with not only USRP kits but also other kind of  
devices which are  
connected via USBport or ethernet. I have developed python programs  
using gnuradio,  
but currently I am required to use C++, and I prefer to use  
Code::Blocks.

I have taken a look at the gnuradio files installed in a bit more  
details and seen I could use lots  
of gnuradio libraries by providing the link directory of the related .so  
files and header files.

But I have not seen any .so file related to uhd files of gnuradio. By  
the way, if I am not wrong,  
for example for an audio device which is connected via USB port could be  
accessible by  
using gnuradio-audio sink/source files.

Thank you,  
Abdullah

On Sunday, April 13, 2014 2:21 AM, Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi Abdullah,

Now I’m even more confused.  
GNU Radio has no USB or Ethernet functionality at all (It has network  
blocks, but they don’t have anything to do with ethernet level – they  
just use your operation system’s sockets and don’t care about ethernet  
at all).

Modern GNU Radio builds are split up in several libraries  
(gnuradio-runtime, gnuradio-audio,…). You can usually find these  
using “pkg-config --libs gnuradio-runtime”

So, but one step back:  
What do you want to do? Build an out-of-tree module? In that case,  
Code::blocks should work fine with the CMake build system which is  
usually used to build such modules. That will find the  
necessary  
libraries, linker options and so on for you.

Linking against a shared library alone does not really help you, you  
need to know which symbols are in that library. You usually do that by  
including specific .h describing the functionality. If you know what  
headers you want, you usually know which library to link against.

Greetings,  
Marcus

On 13.04.2014 08:09, abdullah unutmaz wrote:

> Greetins everybody,
> 
> In my previous message, I said I had found no no .so file :).
> 
> I would like to ask you, especially to use usb/ethernet  
> communication functions of gnuradio, which .so file  
> I would need to  
> I have been using Code::Blocks IDE for a while. And I have tried to  
> I would like to ask you, if it would be possible to link GnuRadio  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTSizzAAoJEBQ6EdjyzlHt+0gH/iRMpVhXdYvPe+vYNbkM/OPA  
ZtimSau9P84Yo+wApa+J84n2Lb7jIaeCwckHd2FLhpuw8GYB9C49qggPiGqEO3Lb  
ItwgTPKh7wFCRssH8IstpI7fR72GrdpoyMUUJtMmPdBi4YHvr3emCIi0ZZjKqfTb  
osj2CuwNpFRd9nsIXFHpIq5lb4lOvhwdtlhMgYIeeYxI0Htg0xxV3/2C/KHFksCO  
q92kawC1l4D0KIKginoF59KjkFiK9pUY1c9MDzCjwqynsNIYT4SZz+pESRvBbFI3  
hh80UD7SoKxML33u813hXY5ynpTpXYF4IRDRypXsqGq86XJDdnBE112nk6e8Ip0=  
=mOQ2  
-----END PGP SIGNATURE-----
