# Understanding c++ code

**URL:** <https://www.ruby-forum.com/t/understanding-c-code/240409>\
**Category:** GNU Radio\
**Created:** [April 12, 2014, 4:29pm UTC](https://www.ruby-forum.com/t/understanding-c-code/240409 "2014-04-12T16:29:57Z")\
**Posts on this page:** 5\
**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 12, 2014, 4:29pm UTC](https://www.ruby-forum.com/t/understanding-c-code/240409/1 "2014-04-12T16:29:57Z")

</div>

I installed GNU RADIO from this link  
[http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/](http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/)  
I want to test some blocks & see their output to understand them more  
and  
more.  
for example I opened additive\_scrambler\_bb c++ codes in terminal to  
understand but I want to see how some parameters change in code when  
running it .  
how to output these parameters in terminal ? Can I write in code “cout”  
like any c++code?  
And do I have to build gnuradio again even if I will erase all my  
modifications in code (I don’t want these modifications permanently I  
want  
only to output all parameters to understand the block)

I did the following:  
editing it using vim ./additive\_scrambler\_bb\_impl.cc  
running it to see the output on terminal using  
./additive\_scrambler\_bb\_impl.cc

but when I ran it in terminal I got this message:  
bash: ./additive\_scrambler\_bb\_impl.cc: Permission denied

Thanks

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [April 12, 2014, 5:18pm UTC](https://www.ruby-forum.com/t/understanding-c-code/240409/2 "2014-04-12T17:18:20Z")

</div>

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

Hi Sara,

C++ is a compiled language; you can not execute a source code file.  
You have to recompile the file by rebuilding GNU Radio.  
additive\_scrambler\_bb\_impl.cc contains the implementation of the  
additive\_scrambler\_bb block, it is not itself executable.  
You need to have a flowgraph containing that block to test your  
modified version.

I think you should start with a basic C++ tutorial before you try to  
understand and modify GNU Radio’s C++ codebase – these are very basic  
concepts you are missing.

Greetings,  
Marcus

On 12.04.2014 16:18, Sara C. wrote:

> I installed GNU RADIO from this link

[http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/](http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/)

> 

I want to test some blocks & see their output to understand them more  
and

> terminal using ./additive\_scrambler\_bb\_impl.cc  
> [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/)

iQEcBAEBAgAGBQJTSVj7AAoJEBQ6EdjyzlHtlbIH/2x5VnHdYtdVwcVyo6eOQXwd  
G56c6M94Hv0IjCaGLegIBIzXvahSzU9Iy6YEg4SyY0OHMgvVMQOqILVIoEqpT6XW  
mo+iQRUNTeIvHth2jdH+mhV3S4F50+VJNJ6N7vTqwLIBbneutOlCh1ltUbCTXnCc  
P2BuwctfZssutb1AeYyTFQ1/pOimpIBVicrKrVh8Fe7H+6NEiP4c3YljRWJtbU+T  
td5qG4WJVsxU3+tpP4PaxZ15x3KS8dfqYAQUL5UzmrpRaob1GbIgkNYtdVgER/6y  
Pi3YeFwStPFnBzTO+X/wzr9YjC/wRqXF4bA2ZwKsTs/ws6nXfXPXsFo5V/iSeFs=  
=GESY  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [April 13, 2014, 12:56am UTC](https://www.ruby-forum.com/t/understanding-c-code/240409/3 "2014-04-13T00:56:41Z")

</div>

How to rebuild gnuradio after I changed in c++ codes ?  
Note:  
I installed GNU RADIO from this link  
[http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/](http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/)

2014-04-12 17:17 GMT+02:00 Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [April 13, 2014, 1:03am UTC](https://www.ruby-forum.com/t/understanding-c-code/240409/4 "2014-04-13T01:03:11Z")

</div>

how I can re-build digital library only after making changes in c++ code  
of  
a block… not re-building the whole gnuradio

I installed GNU RADIO from this link  
[http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/](http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/)

2014-04-13 0:55 GMT+02:00 Sara C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [April 13, 2014, 8:29am UTC](https://www.ruby-forum.com/t/understanding-c-code/240409/5 "2014-04-13T08:29:26Z")

</div>

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

Hi Sara,

You have to have a full source tree lying around, where you modify the  
code.  
Then you follow the official wiki’s guide on how to build from source:  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/BuildGuide](http://gnuradio.org/redmine/projects/gnuradio/wiki/BuildGuide)

Greetings,  
Marcus

PS: I’ve mentioned that already, but let me say this once again:  
[gnuradio.org](http://gnuradio.org) is the only source of information that’s not likely to  
outdate.

On 13.04.2014 01:02, Sara C. wrote:

> > How to rebuild gnuradio after I changed in c++ codes ? Note: I  
> > installed GNU RADIO from this link

[http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/](http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/)

> >

2014-04-12 17:17 GMT+02:00 Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > > You need to have a flowgraph containing that block to test
> > > 
> > > >

[http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/](http://blogs.bu.edu/mhirsch/2012/07/installing-gnu-radio-in-ubuntu-12-04-x64/comment-page-1/)

> > > >

I want to test some blocks & see their output to understand them more  
and

> > > > ./additive\_scrambler\_bb\_impl.cc running it to see the output  
> > > > on terminal using ./additive\_scrambler\_bb\_impl.cc
> > > > 
> > > > but when I ran it in terminal I got this message: bash:  
> > > > ./additive\_scrambler\_bb\_impl.cc: Permission denied
> > > > 
> > > > Thanks  
> > > > -----BEGIN PGP SIGNATURE-----  
> > > > Version: GnuPG v1  
> > > > Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTSi5zAAoJEBQ6EdjyzlHtF3cH/RiYAcNGstQDkd75sPGn/5Ow  
f7fKpkMZwxvp3rcbtTTda5DPiwEtvxO1yfajiuyRt3/Ono4qDPhoqcCVdY15HlnM  
NvM1LwjbMXHGH0XQJKa+0ICOW3mCzf2L6Z+1BemyF+tlk3cVX2QwD3aGPN9i8BQ4  
7R/BsDCI08wQ1OhGXM1CSJW5MpTyKsrbgjnZAV6+CvLvbSl3Bp2lBkiZvYmvYqJH  
lWNGfGaC3LvrIOWL9v0Mov2zl1WVXBxqGZzbhJ5v2GExMBj9vdAr7s/TZCliV7/a  
n0LPjEu2cf5rwI9PQeqqrx1NRZkmf7AFOAv2P+n6CJRC74mijNAlbQkg69luzTo=  
=BJuE  
-----END PGP SIGNATURE-----
