# Help with gr-trellis

**URL:** <https://www.ruby-forum.com/t/help-with-gr-trellis/230242>\
**Category:** GNU Radio\
**Created:** [June 6, 2014, 1:14am UTC](https://www.ruby-forum.com/t/help-with-gr-trellis/230242 "2014-06-06T01:14:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [June 6, 2014, 1:14am UTC](https://www.ruby-forum.com/t/help-with-gr-trellis/230242/1 "2014-06-06T01:14:23Z")

</div>

Hello Everyone,

To test my code, I am porting  
gnuradio/gr-trellis/examples/python/test\_tcm.py to c++, and encountering  
an  
error with the trellis fsm constructor.

## I tried creating an fsm object:

## const char\* fsm\_filename = “fsm\_files/awgn1o2\_4.fsm”; gr::trellis::fsm \*f = new gr::trellis::fsm(fsm\_filename);

When I compile, i get the following error:

* * *

## CMakeFiles/tcm.dir/tcm.cc.o: In function `main': /home/tjt7a/src/GR-Router/apps/tcm.cc:71: undefined reference to`gr::trellis::fsm::fsm(char const\*)’ collect2: error: ld returned 1 exit status make[2]: \*\*\* [apps/tcm] Error 1 make[1]: \*\*\* [apps/CMakeFiles/tcm.dir/all] Error 2 make: \*\*\* [all] Error 2

## The following entry exists in the include file:

namespace gr {  
namespace trellis {

```
/*!
 * \brief Finite State Machine Specification class.
 * \ingroup trellis_coding_blk
 *
 * \details
 * An instance of this class represents a finite state machine
 * specification (FSMS) rather than the FSM itself. It particular
 * the state of the FSM is not stored within an instance of this
 * class.
 */
class TRELLIS_API fsm
{

public:

```

…

```
  /*!
   * \brief Constructor to create an FSMS from file contents.
   *
   * \param name filename
   *
   */
  fsm(const char *name);
```

---

<div class="post-metadata">

**Author:** ![tommyjmu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tommyjmu](https://www.ruby-forum.com/u/tommyjmu)\
**Post date:** [June 6, 2014, 5:38pm UTC](https://www.ruby-forum.com/t/help-with-gr-trellis/230242/2 "2014-06-06T17:38:29Z")

</div>

On Thu, Jun 5, 2014 at 7:12 PM, Tommy T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> * * *
> 
> make: \*\*\* [all] Error 2  
> \*
> 
> * * *
> 
> It doesn’t seem to recognize the constructor… am I calling it wrong?
> 
> –  
> Sincerely,  
> Tommy T. II  
> UVA

This is probably just a cmake linking issue. Check to make sure you’re  
properly setting the include directories and linking to the  
gnuradio-trellis in the CMakeLists.txt file.

Tom
