Custom Blocks - Windows

Hi,

I am in the process of creating a custom block for GRC - I have managed
to write the C++, compile and install it all on Linux, but I was hoping
that it would be simple to port that over to Windows (Maybe just place
the right files in the right places). When I did ‘sudo make install’ in
the build directory of my new module, it printed the following:

Install the project…
– Install configuration: “Release”
– Installing: /usr/local/lib/cmake/custom/customConfig.cmake
– Installing: /usr/local/include/custom/api.h
– Installing: /usr/local/include/custom/myMod.h
– Installing: /usr/local/lib/libgnuradio-custom.so
– Installing:
/usr/local/lib/python2.7/dist-packages/custom/_custom_swig.so
– Removed runtime path from
"/usr/local/lib/python2.7/dist-packages/custom/custom_swig.so"
– Installing:
/usr/local/lib/python2.7/dist-packages/custom/custom_swig.py
– Installing:
/usr/local/lib/python2.7/dist-packages/custom/custom_swig.pyc
– Installing:
/usr/local/lib/python2.7/dist-packages/custom/custom_swig.pyo
– Installing: /usr/local/include/custom/custom/swig/custom_swig.i
– Installing: /usr/local/include/custom/custom/swig/custom_swig_doc.i
– Installing: /usr/local/lib/python2.7/dist-packages/custom/init.py
– Installing:
/usr/local/lib/python2.7/dist-packages/custom/init.pyc
– Installing:
/usr/local/lib/python2.7/dist-packages/custom/init.pyo
– Installing: /usr/local/share/gnuradio/grc/blocks/custom
myMod.xml

Is it possible to map the file paths from Linux to the file paths in
Windows and just copy the files? Or is there some other method used to
install a new block in Windows.

Apologies if this has been asked before, but the threads I found didn’t
match what I was looking for.

Thank you,
Luke

Hi Luke,

you should cmake that module on windows, like you cmade it on linux,
because CMake is the only one who can find out where all the libraries,
compilers and tools are that are needed to build this thing for windows.
Doing that shouldn’t be horribly complicated – get the gcc (mingw)
toolchain, cmake, build gnuradio (and its prerequisites) on windows and
install it, then build your module.

A linux .so is not a windows .dll and thus you can’t simply use the same
binaries – if you could always use the same binaries on windows and
linux, these two operating systems would be API-compatible, meaning that
they were but two implementations of the same OS…

Greetings,
Marcus

Luke,

the whole point of build systems is that you shouldn’t have to take care
of this.
When you run cmake on your OOT on Windows, it should set up the build
system for you. Also, you can’t use Linux-shared-libs in Windows.

To be fair, I’ve never done this before, so I can’t give you first-hand
experience. But if you’ve managed to build and install GNU Radio on
Windows, try and repeat those steps for your OOT. If it doesn’t work, at
least you’ll have some verbosity to post here.

M