c语言编写dll为postgresql添加自定义函数

c语言编写dll为postgresql添加自定义函数,编译dll前,需要添加哪些路径呢??pg是64位的~~~

http://blog.csdn.net/iihero/article/details/8218753

编译过程
要注意的是编译过程,需要添加头文件路径,lib路径,bin路径,以完成编译,这个include加了 lib路径也加了 附加依赖项加的postgres.lib ,编译出来的dll,放到PG安装目录的lib下面,用CREATE FUNCTION add_one(integer) RETURNS integer AS 'dll'' LANGUAGE C; 提示错误: 无法加载库 "D:/Program Files/PostgreSQL/9.2/lib/dll.dll": The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log,该咋办

编译过程
要注意的是编译过程,需要添加头文件路径,lib路径,bin路径,以完成编译,这个include加了 lib路径也加了 附加依赖项加的postgres.lib ,编译出来的dll,放到PG安装目录的lib下面,用CREATE FUNCTION add_one(integer) RETURNS integer AS 'dll'' LANGUAGE C; 提示错误: 无法加载库 "D:/Program Files/PostgreSQL/9.2/lib/dll.dll": The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log,该咋办

你使用了.net?不然怎么会有side by side呢?

需要把用到的VC编译器的运行时库dll带过去,或者编译的时候选择/MT