# MySQL?

**URL:** <https://www.ruby-forum.com/t/mysql/232506>\
**Category:** GNU Radio\
**Created:** [October 13, 2014, 5:14pm UTC](https://www.ruby-forum.com/t/mysql/232506 "2014-10-13T17:14:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 13, 2014, 5:14pm UTC](https://www.ruby-forum.com/t/mysql/232506/1 "2014-10-13T17:14:44Z")

</div>

Dear All,

Has anyone tried using MySQL from GNU Radio? I am just posting some  
simple stuff to a MySQL database that runs fine in a stand-alone C  
program. It builds fine in GNU Radio, by including \<mysql.h\>, but there  
is a swig problem on running in GNU Radio Companion

“ImportError: /usr/local/lib/libgnuradio-trl.so: undefined symbol:  
mysql\_init”

Presumably I need to add some libraries to the CMakeLists.txt, or  
similar?

Thanks in advance!

David

* * *

David Halls Ph.D.  
Research Engineer  
Toshiba Research Europe Limited  
32 Queen Square, Bristol, BS1 4ND, UK  
Tel: +44 (0) 117 906 0790

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl

---

<div class="post-metadata">

**Author:** ![divotdave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Post date:** [October 13, 2014, 7:00pm UTC](https://www.ruby-forum.com/t/mysql/232506/2 "2014-10-13T19:00:39Z")

</div>

David,

is the MySQL include in any of your public headers, and does it need to  
be? It might be SWIG is picking up stuff you don’t actually want to pick  
up.

You can also tell SWIG to ignore stuff, have you checked that?

M

---

<div class="post-metadata">

**Author:** ![divotdave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Post date:** [October 13, 2014, 7:03pm UTC](https://www.ruby-forum.com/t/mysql/232506/3 "2014-10-13T19:03:38Z")

</div>

Hi Martin, All,

It was a basic linker problem, I hadn’t correctly included the library  
file in the /lib/CMakeFiles.txt, one needs to include just mysqlclient  
(and the linker directory of course)

Sorry! I wonder if anyone else has use MySQL before with GNU Radio - if  
not _IT WORKS_!!

Thanks,

DH
