On Sun, Jan 13, 2008 at 09:39:20PM +0100, Robert Varttinen wrote: > > Hi all! > > I am experimenting with GNURadio and in particular trying to create > a binding for another language for a module than > Python. Unfortunately I am not that proficient, yet, with Swig and > some of the other tools. After taking a peek at the make files, the > Swig interface files, etc. it seems a bit of a hurdle to grasp at > first. Could someone please provide a pointer to some of the entries > in the files (.i, make-files and others?) of a module (small one) so > I can work out the details for my experiments ...
Sorry, there really aren't any small ones[1]. For gnuradio-core, it all gets pulled together in gnuradio-core/src/lib/swig. We build 5 separate modules that are logically a single entity. (We used to build them as a single entity, but the 6MB of generated C++ code got a bit too large for people with < 512MB to compile). The first module to study is gnuradio.i which gets compiled into gnuradio_swig_py_runtime.*. It contains the base of the inheritance hierarchy. You'll want to spend some quality time with the swig documentation. The main things to study are the overview, C, C++ and Python chapters. We don't do anything fancy with typemaps. We mostly avoid those problems by designing our C++ interfaces to be "SWIG friendly". What's your other language? Let us know when you've got more questions :) Eric [1] Actually, there are a few small ones, but I don't think they'll help you get going. You could look at gr-audio-alsa/src/audio_alsa.i, but it has a dependency on gnuradio.i, so you're back to gnuradio-core/src/lib/swig/gnuradio.i _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
