From: Georg Baum Date: Wed, 8 Apr 2015 20:04:13 +0000 (+0200) Subject: Fix tex2lyx linker error on windows X-Git-Tag: 2.2.0alpha1~1027 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d4718b18b6b29a25aaa869c5f38b49eff20eafef;p=lyx.git Fix tex2lyx linker error on windows The FontMetrics dummy class was in the wrong namespace. Linking on linux did work because the GNU linker is more clever than the MSVC linker for this particular example and throws out more unused code, so that theFontMetrics was not referenced at all. --- diff --git a/src/tex2lyx/dummy_impl.cpp b/src/tex2lyx/dummy_impl.cpp index 9e9c310729..7807a7d2d8 100644 --- a/src/tex2lyx/dummy_impl.cpp +++ b/src/tex2lyx/dummy_impl.cpp @@ -125,15 +125,16 @@ string alignmentToCSS(LyXAlignment) // Dummy FontMetrics (needed by Length) // - +namespace frontend { class FontMetrics { int em() const { return 0; }; }; +} class FontInfo; -FontMetrics const & theFontMetrics(FontInfo const &) { - static FontMetrics dummy; +frontend::FontMetrics const & theFontMetrics(FontInfo const &) { + static frontend::FontMetrics dummy; return dummy; }