Build a DLL from my GNURadio OOT module with Visual Studio 2013

Hi all,

I get into trouble when trying to build a dll from my GNURadio OOT
module
with Visual Studio 2013. I really appreciate if you could help me to
solve
this issue.

I have installed:
GNURadio (got at
http://files.ettus.com/binaries/gnuradio/gnuradio_v3.7.2.2/gnuradio_3.7.2.2_Win32.exe
http://files.ettus.com/binaries/gnuradio/gnuradio_v3.7.2.2/gnuradio_3.7.2.2_Win32.exe)
)
in C:\Program Files (x86).
boost 1.57.0 in C:\local.

Attached please find my gr-test project files.
I have set the properties of the project as follow:

C/C++>> General >> Additional Include Directories:
D:\install_src\uhdtest\gr-test\include;C:\local\boost_1_57_0;C:\Program
Files %28x86%29\gnuradio\include;%(AdditionalIncludeDirectories)

Linker >> General >> Additional Library Directories:
C:\Program Files
%28x86%29\gnuradio\lib;C:\local\boost_1_57_0\lib32-msvc-12.0;%(AdditionalLibraryDirectories)

Linker >> General >> Input:
gnuradio-pmt.lib;volk.lib;gnuradio-runtime.lib;%(AdditionalDependencies)

But when build the dll, some errors occur:
1>------ Build started: Project: gr-test, Configuration: Release Win32

1> add_const_ff_impl.cc
1>lib\add_const_ff_impl.cc(33): warning C4273:
‘gr::test::add_const_ff::make’ : inconsistent dll linkage
1> D:\install_src\uhdtest\gr-test\include\test/add_const_ff.h(49) : see
previous definition of ‘make’
1> Creating library D:\install_src\uhdtest\gr-test\Release\gr-test.lib
and
object D:\install_src\uhdtest\gr-test\Release\gr-test.exp
1>add_const_ff_impl.obj : error LNK2001: unresolved external symbol
“__declspec(dllimport) public: virtual __thiscall
gr::test::add_const_ff::~add_const_ff(void)”
(_imp??1add_const_ff@test@gr@
@UAE@XZ)
1>add_const_ff_impl.obj : error LNK2001: unresolved external symbol
“__declspec(dllimport) public: __thiscall
gr::test::add_const_ff::add_const_ff(void)”
(_imp??0add_const_ff@test@gr@
@QAE@XZ)
1>D:\install_src\uhdtest\gr-test\Release\gr-test.dll : fatal error
LNK1120:
2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped

How to deal with them?

Best regards,
Damon

Hi Martin,

Thanks for your reply.
I am using Windows 7, 64bits.
I have installed GNURadio following #3. And I could run
gnuradio-companion
in my laptop now.
But I would like to build a DLL from my OOT module.
The errors in my last email show that the constructed function and
destructor of class gr::test::add_const_ff are not defined.
There would be not errors if it is built in Ubuntu.

Best regards,
Damon

2015-01-20 10:59 GMT+08:00 Martin O’Shield [email protected]: