Module 'res_odbc.so' was not compiled with the same compile-

Hi,

I have been trying to get ODBC working with Asterisks 11.4.0 & now 11.5.0

I followed the guide http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html

and executing odbcinst -q -d
produces [MySQL]

+---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> +---------------------+ | 1 | +---------------------+ | 1 | +---------------------+ SQLRowCount returns 1 1 rows fetched

However despite compiling from source various times versions 11.4.0 and 11.5.0. Deleting all modules and recompiling etc. Also later trying to install from repositories (on Ubuntu 13.10), I keep getting the following error when executing module load res_odbc.so in asterisk.

From the error, I am assuming that this has nothing to do with the ODBC drivers themselves ?

Unable to load module res_odbc.so Command 'module load res_odbc.so' failed. [Jul 30 00:01:53] WARNING[15837]: loader.c:824 inspect_module: Module 'res_odbc.so' was not compiled with the same compile-time options as this version of Asterisk. [Jul 30 00:01:53] WARNING[15837]: loader.c:825 inspect_module: Module 'res_odbc.so' will not be initialized as it may cause instability. [Jul 30 00:01:53] WARNING[15837]: loader.c:915 load_resource: Module 'res_odbc.so' could not be loaded.

Does anyone have any suggestions ?

you should recompile your asterisk and make sure that res_odbc is selected .

I have done that many times, both with 11.4.0 and 11.5.0. I have also deleted all compiled modules .so to make sure it is being rebuilt. Still no result, same error.

I finally got this working by changing the module.conf file and preloading the res_odbc.so module.