diff --git a/interfaces/Makefile.am b/interfaces/Makefile.am
index 7099bb551b9e1b7a69ae0b3cc67ec29ddec9909a..df378b8baa38ca63ac7901cdfcb27f289dc94631 100644
--- a/interfaces/Makefile.am
+++ b/interfaces/Makefile.am
@@ -194,7 +194,7 @@ setup_cdilib_py_vars = \
 setup_python_cxx_vars = CFLAGS="$(CXXFLAGS) $(DEFS)" \
 	  CC="$${LIBTOOL} --mode=compile --tag=CXX $(CXX) -shared" \
 	  LDSHARED="$${LIBTOOL} --mode=link --tag=CXX $(CXX) -module -shared" \
-	  CXX="$${LIBTOOL} --mode=link --tag=CXX $(CXX) -module -shared"
+	  CXX="$${LIBTOOL} --mode=compile --tag=CXX $(CXX) -shared"
 
 setup_cdiobj_py_vars = \
   setupObj_py=`test -f setupObj.py || echo '$(abs_srcdir)/python/'`setupObj.py ; \
diff --git a/interfaces/python/setupObj.py b/interfaces/python/setupObj.py
index 2705efb87f3a017dda50d8c2490256ee718f4036..14210961ddab9855340d8dc18f4ddfe0e118bcc2 100644
--- a/interfaces/python/setupObj.py
+++ b/interfaces/python/setupObj.py
@@ -20,7 +20,7 @@ cdiobj_module = Extension('_CdiObj',
                   runtime_library_dirs = [os.environ['BUILDLIBDIR'],os.environ['LIBDIR']],
                   extra_link_args = LIBS,
                   libraries    = ['cdi','stdc++'],
-                  language = 'c++',
+                  language = 'c',
                   )
 
 print_libdir = False