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.
on 2012-11-14 22:57
on 2012-11-14 23:00
Below link might be helpful to you: http://www.ruby-forum.com/topic/4407135#new ________________________________ From: Adriana Arteaga <adriarteaga17@hotmail.com> To: "discuss-gnuradio@gnu.org" <discuss-gnuradio@gnu.org> 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.
on 2012-11-16 04:22
On 11/14/2012 01:59 PM, Zing Yu wrote: > Below link might be helpful to you: > http://www.ruby-forum.com/topic/4407135#new > > gr-wavelet is a good example for this as well. -josh
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.