MSVC needs a hint to force it to compile either as C or C++. This patch is against Libtool 2.2 * libltdl/m4/libtool.m4: Add tag variable compile_tag to enable tag specific compiler options that are bad in the linking phase. * libltdl/config/ltmain.m4sh: Add the tag specific options to the compile command line. Index: libtool/libltdl/config/ltmain.m4sh =================================================================== --- libtool.orig/libltdl/config/ltmain.m4sh +++ libtool/libltdl/config/ltmain.m4sh @@ -1484,6 +1484,10 @@ func_mode_compile () pic_mode=default fi + if test -n "$compile_tag"; then + base_compile="$base_compile $compile_tag" + fi + # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then Index: libtool/libltdl/m4/libtool.m4 =================================================================== --- libtool.orig/libltdl/m4/libtool.m4 +++ libtool/libltdl/m4/libtool.m4 @@ -5226,6 +5226,8 @@ _LT_TAGDECL([], [dashL_envvar], [1], [When linking, move all paths specified with -L options to this variable]) _LT_TAGDECL([], [dashL_envvar_spec], [1], [When moving paths with dashL_envvar, prepend this to each path]) +_LT_TAGDECL([], [compile_tag], [1], + [Add tag specific option for the compiler]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects])