amutu / zhparser

zhparser is a PostgreSQL extension for full-text search of Chinese language
Other
719 stars 86 forks source link

windows VS编译错误 #50

Closed dengzq186 closed 3 years ago

dengzq186 commented 3 years ago

把zhparser.h zhparser.c加入到新的dll工程(VS2010,postgre 13,scws-1.2.3), 添加相应的头文件和lib后编译,提示错误如下,该如何是好: 1>d:\program files\postgresql\13\include\server\port.h(41): error C2061: 语法错误: 标识符“pg_set_noblock” 1>d:\program files\postgresql\13\include\server\port.h(41): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(41): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(42): error C2061: 语法错误: 标识符“pg_set_block” 1>d:\program files\postgresql\13\include\server\port.h(42): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(42): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(46): error C2061: 语法错误: 标识符“has_drive_prefix” 1>d:\program files\postgresql\13\include\server\port.h(46): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(46): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(55): error C2061: 语法错误: 标识符“path_contains_parent_reference” 1>d:\program files\postgresql\13\include\server\port.h(55): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(55): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(56): error C2061: 语法错误: 标识符“path_is_relative_and_below_cwd” 1>d:\program files\postgresql\13\include\server\port.h(56): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(56): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(57): error C2061: 语法错误: 标识符“path_is_prefix_of_path” 1>d:\program files\postgresql\13\include\server\port.h(57): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(57): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(71): error C2061: 语法错误: 标识符“get_home_path” 1>d:\program files\postgresql\13\include\server\port.h(71): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(71): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(218): error C2146: 语法错误: 缺少“)”(在标识符“echo”的前面) 1>d:\program files\postgresql\13\include\server\port.h(218): error C2081: “_Bool”: 形参表中的名称非法 1>d:\program files\postgresql\13\include\server\port.h(218): error C2061: 语法错误: 标识符“echo” 1>d:\program files\postgresql\13\include\server\port.h(218): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(218): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\port.h(259): error C2061: 语法错误: 标识符“pgwin32_is_junction” 1>d:\program files\postgresql\13\include\server\port.h(259): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(259): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(265): error C2061: 语法错误: 标识符“rmtree” 1>d:\program files\postgresql\13\include\server\port.h(265): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(265): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(487): error C2146: 语法错误: 缺少“)”(在标识符“write_message”的前面) 1>d:\program files\postgresql\13\include\server\port.h(487): error C2081: “_Bool”: 形参表中的名称非法 1>d:\program files\postgresql\13\include\server\port.h(487): error C2061: 语法错误: 标识符“write_message” 1>d:\program files\postgresql\13\include\server\port.h(487): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(487): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\port.h(498): error C2061: 语法错误: 标识符“pg_strong_random” 1>d:\program files\postgresql\13\include\server\port.h(498): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(498): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(521): error C2061: 语法错误: 标识符“wait_result_is_signal” 1>d:\program files\postgresql\13\include\server\port.h(521): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(521): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\port.h(522): error C2061: 语法错误: 标识符“wait_result_is_any_signal” 1>d:\program files\postgresql\13\include\server\port.h(522): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\port.h(522): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\utils\elog.h(149): error C2061: 语法错误: 标识符“errstart” 1>d:\program files\postgresql\13\include\server\utils\elog.h(149): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(149): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\utils\elog.h(191): error C2146: 语法错误: 缺少“)”(在标识符“hide_stmt”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(191): error C2061: 语法错误: 标识符“hide_stmt” 1>d:\program files\postgresql\13\include\server\utils\elog.h(191): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(191): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\utils\elog.h(192): error C2146: 语法错误: 缺少“)”(在标识符“hide_ctx”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(192): error C2061: 语法错误: 标识符“hide_ctx” 1>d:\program files\postgresql\13\include\server\utils\elog.h(192): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(192): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\utils\elog.h(354): error C2061: 语法错误: 标识符“_Bool” 1>d:\program files\postgresql\13\include\server\utils\elog.h(355): error C2061: 语法错误: 标识符“output_to_client” 1>d:\program files\postgresql\13\include\server\utils\elog.h(355): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(356): error C2061: 语法错误: 标识符“show_funcname” 1>d:\program files\postgresql\13\include\server\utils\elog.h(356): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(357): error C2061: 语法错误: 标识符“hide_stmt” 1>d:\program files\postgresql\13\include\server\utils\elog.h(357): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(358): error C2061: 语法错误: 标识符“hide_ctx” 1>d:\program files\postgresql\13\include\server\utils\elog.h(358): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(384): error C2059: 语法错误:“}” 1>d:\program files\postgresql\13\include\server\utils\elog.h(387): error C2143: 语法错误 : 缺少“{”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(388): error C2143: 语法错误 : 缺少“)”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(388): error C2143: 语法错误 : 缺少“{”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(388): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\utils\elog.h(390): error C2143: 语法错误 : 缺少“)”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(390): error C2143: 语法错误 : 缺少“{”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(390): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\utils\elog.h(391): error C2143: 语法错误 : 缺少“)”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(391): error C2143: 语法错误 : 缺少“{”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(391): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\utils\elog.h(397): error C2143: 语法错误 : 缺少“)”(在“”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(397): error C2143: 语法错误 : 缺少“{”(在“*”的前面) 1>d:\program files\postgresql\13\include\server\utils\elog.h(397): error C2059: 语法错误:“)” 1>d:\program files\postgresql\13\include\server\utils\elog.h(398): error C2061: 语法错误: 标识符“emit_log_hook” 1>d:\program files\postgresql\13\include\server\utils\elog.h(398): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(414): error C2061: 语法错误: 标识符“syslog_sequence_numbers” 1>d:\program files\postgresql\13\include\server\utils\elog.h(414): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(415): error C2061: 语法错误: 标识符“syslog_split_messages” 1>d:\program files\postgresql\13\include\server\utils\elog.h(415): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(426): error C2061: 语法错误: 标识符“in_error_recursion_trouble” 1>d:\program files\postgresql\13\include\server\utils\elog.h(426): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\utils\elog.h(426): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\postgres.h(380): error C2061: 语法错误: 标识符“_Bool” 1>d:\program files\postgresql\13\include\server\postgres.h(382): error C2059: 语法错误:“}” 1>d:\program files\postgresql\13\include\server\pgtime.h(57): error C2061: 语法错误: 标识符“pg_interpret_timezone_abbrev” 1>d:\program files\postgresql\13\include\server\pgtime.h(57): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\pgtime.h(57): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\pgtime.h(62): error C2061: 语法错误: 标识符“pg_get_timezone_offset” 1>d:\program files\postgresql\13\include\server\pgtime.h(62): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\pgtime.h(62): error C2059: 语法错误:“类型” 1>d:\program files\postgresql\13\include\server\pgtime.h(64): error C2061: 语法错误: 标识符“pg_tz_acceptable” 1>d:\program files\postgresql\13\include\server\pgtime.h(64): error C2059: 语法错误:“;” 1>d:\program files\postgresql\13\include\server\pgtime.h(64): error C2059: 语法错误:“类型”