HAYASHI Kentaro
null+****@clear*****
Fri Oct 5 15:23:42 JST 2012
HAYASHI Kentaro 2012-10-05 15:23:42 +0900 (Fri, 05 Oct 2012) New Revision: 5d8f299dca1c8e1b23c8172b62fe7d7da1b6d1bb https://github.com/mroonga/mroonga/commit/5d8f299dca1c8e1b23c8172b62fe7d7da1b6d1bb Log: win32: compile mrn_table with extern "C" linkage This change indended to link with variables declared at ha_mroonga.cpp. ha_mroonga is compiled with extern "C" linkage, but mrn_table is not, so Visual Studio can't resolve such external symbols. Original error message is following: mrn_table.obj : error LNK2001: unresolved external symbol "char * mrn_default_parser" (?mrn_default_parser@@3PEADEA) [c:\work\mroonga\mroonga-vs2010-x64\ha_mroonga.vcxproj] ... Modified files: mrn_table.cpp mrn_table.hpp Modified: mrn_table.cpp (+8 -0) =================================================================== --- mrn_table.cpp 2012-10-05 09:32:40 +0900 (7981cf3) +++ mrn_table.cpp 2012-10-05 15:23:42 +0900 (1c673cd) @@ -43,6 +43,10 @@ #define MRN_GROONGA_STR "GROONGA" #define MRN_GROONGA_LEN (sizeof(MRN_GROONGA_STR) - 1) +#ifdef __cplusplus +extern "C" { +#endif + extern HASH mrn_open_tables; extern pthread_mutex_t mrn_open_tables_mutex; extern char *mrn_default_parser; @@ -923,3 +927,7 @@ void mrn_clear_alter_share(THD *thd) } DBUG_VOID_RETURN; } + +#ifdef __cplusplus +} +#endif Modified: mrn_table.hpp (+8 -0) =================================================================== --- mrn_table.hpp 2012-10-05 09:32:40 +0900 (e8ea969) +++ mrn_table.hpp 2012-10-05 15:23:42 +0900 (f0c5302) @@ -21,6 +21,10 @@ #ifndef _mrn_table_hpp #define _mrn_table_hpp +#ifdef __cplusplus +extern "C" { +#endif + #include <groonga.h> typedef struct st_mroonga_share @@ -112,4 +116,8 @@ void mrn_set_bitmap_by_key(MY_BITMAP *map, KEY *key_info); st_mrn_slot_data *mrn_get_slot_data(THD *thd, bool can_create); void mrn_clear_alter_share(THD *thd); +#ifdef __cplusplus +} +#endif + #endif /* _mrn_table_hpp */ -------------- next part -------------- HTML����������������������������...Download