How to use other modules in my out-of-tree module?

In my out-of-tree module (in develop)

I want to use Reed-Solomon encoder and decoder from gr-dvbt

I’ve successfully installed gr-dvbt.

In my code, it contains:

#include <dvbt/reed_solomon_enc.h>
#include <dvbt/reed_solomon_dec.h>
#include <dvbt/reed_solomon.h>

and variable declaration:

reed_solomon::reed_solomon d_rs(rs_p, rs_m, gfpoly, phy.rs_n, 

phy.rs_k,
phy.rs_t2 / 2, phy.rs_s, blocks);

and so on.

When I build my module with make command, the following errors appear:

gr-mymodule/lib/utils.cc: In function ‘void outer_encode(char*, 

char*,
tx_param&, phy_param&)’:
gr-mymodule/lib/utils.cc:170:3: error: ‘reed_solomon’ has not been
declared
reed_solomon::reed_solomon d_rs(rs_p, rs_m, gfpoly, phy.rs_n,
phy.rs_k, phy.rs_t2 / 2, phy.rs_s, blocks); // gr-dvbt
^

I think I need to modify CMakeLists.txt in somewhere and somehow to tell
‘I
will be using gr-dvbt’, but I have no idea to do it.

Does anyone have an idea for my problem?

Regards,
Jeon.

On Fri, Mar 20, 2015 at 4:07 AM, Jeon [email protected]
wrote:

#include <dvbt/reed_solomon_dec.h>

Does anyone have an idea for my problem?

Regards,
Jeon.

I haven’t tested this, just looked at the code, so not sure this is the
full answer. You’re using reed_solomon as the namespace, which it’s not;
it’s the class name under the dvbt namespace. Try calling it like:

dvbt::reed_solomon d_rs(…)

You will have to link against the dvbt library in the CMakeLists.txt
file
(in the lib/ directory), but this is a compiler error, not a linker
error.

Tom

Thanks, TOm.

Answer to my question.

gr::dvbt::reed_solomon d_rs(…) works.

No CMakeLists modification and other stuffs are needed.

Regards,
Jeon.

2015-03-20 22:36 GMT+09:00 Tom R. [email protected]: