Hi Martin, I did look through the CMake documentation and was trying different things with the target_link_libraries tag, with no success.
What I am trying to do is (and this may be a solved problem already) build a gnuradio block for the RFSpaces SDR-IQ receiver. This is mostly for me to become more familiar with Linux programming and to learn more about Python. I wrote a library that is able to retrieve data from the SDR-IQ and it is called libsdriq.a, now I want to use that library with gnuradio. Following the gnuradio tutorial on out of tree blocks, I created a block called gr-sdriq and it works fine with dummy data, has a complex output port and outputs a cosine and sine to the real and imaginary parts and I can see the data as expected in gnuradio. My problem is getting the gnuradio block to use my libsdriq.a library and that is where things are breaking. Compiling is not a problem, but linking is not producing a gnuradio block that includes my libsdriq.a. I've looked through some gnuradio blocks to see if I could find something similar and through CMake documentation. This is likely solved through CMake, but haven't figured it out yet. Jim On Sun, Dec 8, 2013 at 9:24 AM, Martin Braun (CEL) <martin.br...@kit.edu>wrote: > On Sat, Dec 07, 2013 at 08:40:45PM -0500, James Austin wrote: > > I'm a long time Windows programmer trying to write a gnuradio module to > improve > > my Linux development skills. > > > > I created a gnuradio module following the tutorial that just sends dummy > data > > back to gnuradio. That works fine, I can plot the dummy data in my > flowgraph > > and it works and displays as expected. > > > > I also created a static library that produces data, no reason I can't > make it a > > shared library if that is the solution. > > > > My problem is trying to get the gnuradio module to link against the > static > > library, so that the data produced by this library can be fed into > gnuradio. I > > haven't been able to figure out the cmake magic to make this happen. I > get a > > variety of error messages on everything I try. > > > > Does anyone have any hints to get me past this? > > Hey Jim, > > you're not giving us much to work on here. You might want to specify > what exactly you're linking to, and what you've tried. > > What you're trying to do seems like a cmake problem, so checking cmake > tutorials (unrelated to GNU Radio) might help. > > Most often, you want your C++ blocks to access some library. This would > mean editing the lib/CMakeLists.txt file to make sure you're linking to > the right libs. > > MB > > -- > Karlsruhe Institute of Technology (KIT) > Communications Engineering Lab (CEL) > > Dipl.-Ing. Martin Braun > Research Associate > > Kaiserstraße 12 > Building 05.01 > 76131 Karlsruhe > > Phone: +49 721 608-43790 > Fax: +49 721 608-46071 > www.cel.kit.edu > > KIT -- University of the State of Baden-Württemberg and > National Laboratory of the Helmholtz Association > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio