I am having the exact same issues as those discussed in this thread and have not found any solutions that work. I apologize for the strange-ness of the email but we've been struggling with this problem for several days.
First, I have GNU Radio 184.108.40.206 installed on three different Laptops each running 64-bit Ubuntu. GNURadio was installed using the 'apt-get' install call for gnuradio with no other modifications. The steps below will produce this exact problem on every machine we have tried it on.
Pick any GNU Radio Tutorial such as the 'square2_ff' Tutorial. Follow all the steps exactly as indicated to create the basic block. Compile and install the block into GNURadio following the steps in the Tutorial. Run the Block in GNURadio. The Block should work in GNURadio exactly as indicated in the Tutorial. Great Tutorial by the way!
Now, completely exit GNURadio. Open the 'square2_ff_impl.cc' file (or whatever your implementation file is) and add (any) one of the C++ API Class Headers such as:
Next, in the constructor for square2_ff_impl add a single line to instantiate a filter object such as:
Make sure the 'm_taps' vector does in fact hold values but don't do anything else here. Just declare a variable of the C++ API Class you picked. Do not modify any other files than the .cc file.
Following this, compile the Block code and install the Block into GNURadio again following the exact same steps from the Tutorial as before. The Test Steps on my machine do not indicate any errors here, which is adding to my confusions.
Open GNURadio and try running the 'square2_ff' (or whatever yours is called) Block again.
Now, with every machine I've tried this on, you will get the error:
AttributeError:'module' object has no attribute 'square2_ff'
Following this, exit GNURadio completely.
Open the source module 'square2_ff_impl.cc' file again and comment out only the line where you instantiated the 'filter' object. Leave the #include for 'fir_filter_fff.h' alone. Recompile and reinstall the Block back into GNURadio following the Tutorial steps as before. Don't modify anything else other than the .cc file.
Open GNURadio again and try the square2_ff block again. This time it works exactly as it should with no errors.
For some reason, the C++ OOT Blocks will not run inside GNU Radio if I try to use any of the C++ API Classes in the implementation code. I've tried everything I can think to move the declarations/headers around but nothing works. Granted, I have not tried every single API Class but I've tried enough to know it doesn't work. I do not touch any of the swig or python files or XML files. The only file I touch is the implementation file and this is enough to cause this error.
What am I doing wrong here? This problem is all over the internet but none of the solutions offered seem to work on any machine I try them on??
Any help on this would be greatly appreciated.