# Make Errors with Out of Tree Block

**URL:** <https://www.ruby-forum.com/t/make-errors-with-out-of-tree-block/241036>\
**Category:** GNU Radio\
**Created:** [May 10, 2014, 12:35am UTC](https://www.ruby-forum.com/t/make-errors-with-out-of-tree-block/241036 "2014-05-10T00:35:38Z")\
**Posts on this page:** 3\
**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:** [May 10, 2014, 12:35am UTC](https://www.ruby-forum.com/t/make-errors-with-out-of-tree-block/241036/1 "2014-05-10T00:35:38Z")

</div>

I have an energy detector block and I am trying to gr\_message with it:

```
void energy_detector_sink_f_impl::send_to_message_q(float *buffer, 

```

int  
buffersz) {  
gr\_message\_sprt msg = gr\_make\_message(0, sizeof(float),  
buffersz,  
sizeof(float)\*buffersz);  
memcpy(msg-\>msg(), buffer, sizeof(float) \* buffersz);  
d\_msgq-\>insert\_tail(msg);  
}

and I get this error when I run the “make” command

/home/fox/git\_repos/custom\_modules/gr-specsense/lib/energy\_detector\_sink\_f\_impl.cc:  
In member function ‘void  
gr::specsense::energy\_detector\_sink\_f\_impl::send\_to\_message\_q(float\*,  
int)’:  
/home/fox/git\_repos/custom\_modules/gr-specsense/lib/energy\_detector\_sink\_f\_impl.cc:134:  
error: ‘gr\_message\_sprt’ was not declared in this scope  
/home/fox/git\_repos/custom\_modules/gr-specsense/lib/energy\_detector\_sink\_f\_impl.cc:134:  
error: expected ‘;’ before ‘msg’  
/home/fox/git\_repos/custom\_modules/gr-specsense/lib/energy\_detector\_sink\_f\_impl.cc:135:  
error: ‘msg’ was not declared in this scope  
make[2]: \*\*\*  
[lib/CMakeFiles/gnuradio-specsense.dir/energy\_detector\_sink\_f\_impl.cc.o]  
Error 1  
make[1]: \*\*\* [lib/CMakeFiles/gnuradio-specsense.dir/all] Error 2

What am I doing wrong here? I thought msg is getting declared with  
gr\_message\_sptr msg =

Thanks

Jon

PS I attached the C++ code to be through.

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [May 10, 2014, 2:51pm UTC](https://www.ruby-forum.com/t/make-errors-with-out-of-tree-block/241036/2 "2014-05-10T14:51:29Z")

</div>

On 05/10/2014 12:34 AM, Jonathan F. wrote:

> and I get this error when I run the “make” command  
> make[2]: \*\*\*  
> [lib/CMakeFiles/gnuradio-specsense.dir/energy\_detector\_sink\_f\_impl.cc.o]  
> Error 1  
> make[1]: \*\*\* [lib/CMakeFiles/gnuradio-specsense.dir/all] Error 2
> 
> What am I doing wrong here? I thought msg is getting declared with  
> gr\_message\_sptr msg =

Maybe a sign to move away from message queues? 😃

In any case, you have a typo in the code. Fix it and your errors should  
go away.

M

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [May 12, 2014, 5:26pm UTC](https://www.ruby-forum.com/t/make-errors-with-out-of-tree-block/241036/3 "2014-05-12T17:26:33Z")

</div>

Share pointer abbreviation: S-P-T-R not S-P-R-T.

Thanks for the pointer about typos Martin.
