discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Exports in _runtime_swig.pyd


From: Gisle Vanem
Subject: Re: [Discuss-gnuradio] Exports in _runtime_swig.pyd
Date: Sun, 19 Oct 2014 15:13:46 +0200

I wrote:

Thus functions/vars in _runtime_swig.pyd gets a dllexport linkage.
But comparing to gnuradio-runtime/swig/pmt_swig.i there is no
PMT_API at the top. Why the difference?

Further to the problem I had with linking in the Swig code for this:
 extern const pmt_t PMT_T;  (in pmt_swig.i)

This may work fine with the GNU linker, but MSVC needs explicit
dllimport. So I patched pmt_swig.i like this:

--- pmt_swig.i.orig     2014-09-24 13:48:36 +0000
+++ pmt_swig.i        2014-10-19 14:51:19 +0000
@@ -80,11 +80,6 @@
    swig_int_ptr.__repr__ = lambda self: write_string(self)
  %}

-
-  extern const pmt_t PMT_T;
-  extern const pmt_t PMT_F;
-  extern const pmt_t PMT_EOF;
-
  pmt_t get_PMT_NIL();
  #define PMT_NIL get_PMT_NIL()

---------

<pmt/pmt.h> already has the proper import decoration. No point declaring
those with 'extern'. So now .py examples using _pmt_swig.pyd works just
fine.

I noted in the Ettus Gr installation, there where no _pmt_swig.pyd.
Maybe that's due to the problem they had with link that on Windows.
Seems imposible w/o correct DLL-linkage.

--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]