Thread: problem compiling C++ modules in /contrib

problem compiling C++ modules in /contrib

From
"Merlin Moncure"
Date:
Inside /contrib under mingw, all the modules are built with dllwrap to
make them into loadable modules.

For C++ modules, the option --driver-name g++ has to be added to dllwrap
or they don't link properly.  Is there a way to edit the makefile safely
so thips option gets passed to dllwrap?

In other words, with the standard makefile, we get:
g++ -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -I. -I../../src/include
-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../src/include/port/win32"  -c -o lockmgr.o lockmgr.cc
dlltool --export-all --output-def lockmgr.def lockmgr.o
dllwrap -o lockmgr.dll --def lockmgr.def lockmgr.o  -L../../src/backend
-lpostgres

and we need (which compiles and links):
g++ -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -I. -I../../src/include
-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../src/include/port/win32"  -c -o lockmgr.o lockmgr.cc
dlltool --export-all --output-def lockmgr.def lockmgr.o
dllwrap -o lockmgr.dll --driver-name g++ --def lockmgr.def lockmgr.o
-L../../src/backend -lpostgres

Merlin