Skip navigation links

MySQL Forums


Advanced Search

Re: Fulltext plugin Example for Windows
Posted by: Clement Ho ()
Date: June 27, 2007 10:16AM

After all these days (4 days), I finally found a way to get the FullText plug-in example working in Windows.
Here is the link that you need to read first.
1. http://dev.mysql.com/doc/refman/5.0/en/udf-compiling.html
2. http://dev.mysql.com/doc/refman/5.1/en/plugin-creating.html

Then go to Cygwin.org to download the Cygwin. Remember to get the cmake. I can't remember if it is already come with the Cygwin or I download it. When you doing the download, please check the Devl section of the list.

Then create a file call plugin_example.def in the same directory of plugin_example.c with the functions that are on the plugin_example.c.
-------------------
LIBRARY plugin_example
VERSION 1.0
EXPORTS
number_of_calls
simple_parser_plugin_init
simple_parser_plugin_deinit
simple_parser_init
simple_parser_deinit
add_word
simple_parser_parse
simple_parser_descriptor
simple_status

sysvar_one_value
sysvar_two_value

simple_system_variables
_mysql_plugin_interface_version_
_mysql_plugin_declarations_
------------------------

Then follow the link 1. instruction and create CMakeLists.txt with the following text in the same directory of plugin_example.c
--------------------
PROJECT(plugin_example)
INCLUDE_DIRECTORIES("C:\\cygwin\\usr\\local\\mysql-5.1\\include")

ADD_DEFINITIONS("-DMYSQL_DYNAMIC_PLUGIN")
ADD_LIBRARY(plugin_example MODULE plugin_example.c plugin_example.def)
TARGET_LINK_LIBRARIES(plugin_example wsock32)
--------------------

Then in Cygwin, type in cmake -G "Visual Studio 8 2005" (if you are using VS2005 like me) (check out cmake --help for more option) (Don't use VS6 since plugin.h require long long, VS 6 doesn't support 64bit. I have already tired). Then it will generate the VS sln file.

You should know how to process for the rest.

Good Hunting and Good Luck.

Clement

Options: ReplyQuote


Subject Written By Posted
Fulltext plugin Example for Windows Clement Ho 06/26/2007 11:11AM
Re: Fulltext plugin Example for Windows Clement Ho 06/27/2007 10:16AM
Re: Fulltext plugin Example for Windows William Del Genio 06/27/2007 11:15AM
Re: Fulltext plugin Example for Windows Clement Ho 07/02/2007 11:13AM


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