discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] GNU Radio & GSL


From: Zing Yu
Subject: Re: [Discuss-gnuradio] GNU Radio & GSL
Date: Wed, 14 Nov 2012 13:59:34 -0800 (PST)

Below link might be helpful to you:
http://www.ruby-forum.com/topic/4407135#new


From: Adriana Arteaga <address@hidden>
To: "address@hidden" <address@hidden>
Sent: Wednesday, November 14, 2012 3:56 PM
Subject: [Discuss-gnuradio] GNU Radio & GSL

Hi!
I'm trying to do a block for GRC, using some functions availables in GSL.
First, I put a example within work function including "#include <gsl/gsl_sf_bessel.h>"

***************
int
ocupacion_correlator::general_work (int noutput_items,
                   gr_vector_int &ninput_items,
                   gr_vector_const_void_star &input_items,
                   gr_vector_void_star &output_items)
{
  const float *in = (const float *) input_items[0];
  float *out = (float *) output_items[0];
  float x = 5.0;
  float y = gsl_sf_bessel_J0 (x);
  printf ("J0(%g) = %.18e\n", x, y);
  out[0]=y;
  out[1]=x;

  // Tell runtime system how many input items we consumed on
  // each input stream.
  consume_each (noutput_items);

  // Tell runtime system how many output items we produced.
  return noutput_items;
}
***************

During the exection of cmake, make and make install, I didn't have any problem. But, when I execute the flow graph in GRC this error appears:

****************
Traceback (most recent call last):
  File "/home/xuan/Documents/GRC generados/probando_correlator_gsl/top_block.py", line 14, in <module>
    import ocupacion
  File "/usr/local/lib/python2.7/dist-packages/ocupacion/__init__.py", line 45, in <module>
    from ocupacion_swig import *
  File "/usr/local/lib/python2.7/dist-packages/ocupacion/ocupacion_swig.py", line 26, in <module>
    _ocupacion_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/ocupacion/ocupacion_swig.py", line 22, in swig_import_helper
    _mod = imp.load_module('_ocupacion_swig', fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-ocupacion.so: undefined symbol: gsl_sf_bessel_J0
****************

I think I have to make some change on Makefile or a PATH, but I don't know how. I installed gsl-bin and libgsl0ldbl packets.

Best Regards.

Adriana A.


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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