MySQL Forums
Forum List  »  UDF

Error Code: 1126. Can't open shared library 'XXX' (errno: 126 The specified module could not be found.)
Posted by: Marie Duarte
Date: November 13, 2013 04:03PM

I have built and compiled a UDF in C (using Visual Studio Express for Windows 2012).

The UDF compiled I was able to install it and use it perfectly on a local MySQL server on my machine (the same machine I used to build and compile the DLL) local server version: 5.6.14-log MySQL Community Server (GPL) compiled for Win64 (x86_64)

THE PROBLEM: When I copy the .dll file to the live MySQL server I get the error message:
Error Code: 1126. Can't open shared library 'XXX' (errno: 126 The specified module could not be found.)

live MySqL Server version: 5.6.10 MySQL Community Server (GPL) compiled for Win64 (x86_64).

Note The slight difference in versions; plug-in directories were also different.


What are the requirements for a .dll file to be portable across different MySQL servers?


I built the .dll following instructions in Chapter 1 of:

Golubchik, S., & Hutchings, A. (2010). MySQL 5.1 Plugin Development. Birmingham: Packt Publishing.

and those of

Jeff Beard: http://jeffbeard.org/2011/05/mysql-udf_median-on-windows-7-64bit/

The instructions in the book are quite similar to those of:
Roland Bouman: http://rpbouman.blogspot.com.au/2007/09/creating-mysql-udfs-with-microsoft.html


Exceptions:
* As specified by Golubchick & Hutchings, I added a definitions file in the Input section under Module Definition File containing
EXPORTS
XXX
XXX_init
XXX_deinit
XXX_add
XXX_clear
* I did not add the HAVE_DLOPEN macro (see Roland Bourman)
* I did not change Configuration Properties > General > Platform Toolset to Windows7.1SDK, rather I left it at the default of Visual Studio 2012 (v110) (see Jeff Beard)

Options: ReplyQuote


Subject
Views
Written By
Posted
Error Code: 1126. Can't open shared library 'XXX' (errno: 126 The specified module could not be found.)
8291
November 13, 2013 04:03PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.