Re: [Discuss-gnuradio] Out-of-Tree Block and Gnu Scientific Library: problems with SWIG?

2016-11-18 Thread Ron Economos

You add it to this line in lib/CMakeLists.txt:

target_link_libraries(gnuradio-xxx ${Boost_LIBRARIES} 
${GNURADIO_ALL_LIBRARIES})


like so:

target_link_libraries(gnuradio-xxx ${Boost_LIBRARIES} 
${GNURADIO_ALL_LIBRARIES} -lgsl)


This is the quick and dirty way. The better way is to use a cmake 
find_package command.


In ./CMakeLists.txt after these lines:

find_package(CppUnit)
find_package(Doxygen)

add:

find_package(GSL)

This is optional, but I like to add it. After this line:

if(NOT CPPUNIT_FOUND)
message(FATAL_ERROR "CppUnit required to compile xxx")
endif()

add:

if(NOT GSL_FOUND)
message(FATAL_ERROR "Gsl required to compile xxx")
endif()

In lib/CMakeLists.txt:

target_link_libraries(gnuradio-xxx ${Boost_LIBRARIES} 
${GNURADIO_ALL_LIBRARIES} ${GSL_LIBRARIES})


Finally, copy the file gnuradio/cmake/Modules/FindGSL.cmake to your OOT 
cmake/Modules. You may want to edit out all the Windows stuff in it 
(assuming you're on Linux).


Ron

On 11/18/2016 12:23 AM, emanuel.staudin...@dlr.de wrote:


Dear GnuRadio experts,

I want to use some minimization functions from the Gnu Scientific 
Library (GSL) in my own OOT module, e.g. a simple 1-D minimizer such 
as Brent’s method. In my OOT module I can compile and install my new 
block with GSL without any errors (seems like compilation and linking 
worked), but when the flow-graph in GRC is started I get an error that 
a module (which is already there and worked before) cannot be found. I 
had a similar problem once when I used e.g., the FFT block in my OOT 
module and forgot to add “FFT” as part of the required blocks in the 
CmakeLists file. There I got the some error message.


So how do I add the GSL correctly to my Cmake list? I checked some 
older mails in the archive but did not get any smarter. I also saw 
that GnuRadio already depends on GSL. So how could I proceed?


Regards,

Emanuel



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


[Discuss-gnuradio] Out-of-Tree Block and Gnu Scientific Library: problems with SWIG?

2016-11-18 Thread Emanuel.Staudinger
Dear GnuRadio experts,

I want to use some minimization functions from the Gnu Scientific Library (GSL) 
in my own OOT module, e.g. a simple 1-D minimizer such as Brent's method. In my 
OOT module I can compile and install my new block with GSL without any errors 
(seems like compilation and linking worked), but when the flow-graph in GRC is 
started I get an error that a module (which is already there and worked before) 
cannot be found. I had a similar problem once when I used e.g., the FFT block 
in my OOT module and forgot to add "FFT" as part of the required blocks in the 
CmakeLists file. There I got the some error message.

So how do I add the GSL correctly to my Cmake list? I checked some older mails 
in the archive but did not get any smarter. I also saw that GnuRadio already 
depends on GSL. So how could I proceed?

Regards,
Emanuel

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