diff --git a/README.md b/README.md index e09efed..0d39728 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ $ USE_PGXS=1 make install Windows ------- -Sorry, never tried it. ;( +There are several ways to build wal2json on Windows. If you are build PostgreSQL too, you can put wal2json directory inside contrib, change the contrib Makefile (variable SUBDIRS) and build it following the [Installation from Source Code on Windows](http://www.postgresql.org/docs/current/static/install-windows.html) instructions. However, if you already have PostgreSQL installed, it is also possible to compile **wal2json** out of the tree. Edit wal2json.vcxproj file and change `c:\postgres\pg103` to the PostgreSQL prefix directory. The next step is to open this project file in MS Visual Studio and compile it. Final step is to copy `wal2json.dll` to the `pg_config --pkglibdir` directory. Configuration ============= diff --git a/wal2json.c b/wal2json.c index fbfab74..9cdf4fe 100644 --- a/wal2json.c +++ b/wal2json.c @@ -27,7 +27,7 @@ PG_MODULE_MAGIC; extern void _PG_init(void); -extern void _PG_output_plugin_init(OutputPluginCallbacks *cb); +extern void PGDLLEXPORT _PG_output_plugin_init(OutputPluginCallbacks *cb); typedef struct { diff --git a/wal2json.vcxproj b/wal2json.vcxproj new file mode 100644 index 0000000..1c16609 --- /dev/null +++ b/wal2json.vcxproj @@ -0,0 +1,96 @@ + + + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {185AF5B6-C04A-4710-8330-18A4416BD225} + Win32Proj + 8.1 + + + + DynamicLibrary + true + v141 + + + DynamicLibrary + false + v141 + + + + + + + + + + + + + + + false + + + false + + + + C:\postgres\pg103\include\server\port\win32_msvc;C:\postgres\pg103\include\server\port\win32;C:\postgres\pg103\include\server;C:\postgres\pg103\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;WIN32_STACK_RLIMIT=4194304;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;DEBUG=1%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + 4018;4244;4273;4102;4090;4267;%(DisableSpecificWarnings) + /MP %(AdditionalOptions) + Default + + + .\x64\Debug\wal2json.dll + C:\postgres\pg103\lib;%(AdditionalLibraryDirectories) + postgres.lib;libpgcommon.lib;libpgport.lib;%(AdditionalDependencies) + MachineX64 + /ignore:4197 %(AdditionalOptions) + + + false + + + + + C:\postgres\pg103\include\server\port\win32_msvc;C:\postgres\pg103\include\server\port\win32;C:\postgres\pg103\include\server;C:\postgres\pg103\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;WIN32_STACK_RLIMIT=4194304;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;DEBUG=1%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + 4018;4244;4273;4102;4090;4267;%(DisableSpecificWarnings) + /MP %(AdditionalOptions) + Default + + + .\x64\Release\wal2json.dll + C:\postgres\pg103\lib;%(AdditionalLibraryDirectories) + postgres.lib;libpgcommon.lib;libpgport.lib;%(AdditionalDependencies) + MachineX64 + /ignore:4197 %(AdditionalOptions) + + + false + + + + + + + + + \ No newline at end of file