From d4718b18b6b29a25aaa869c5f38b49eff20eafef Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Wed, 8 Apr 2015 22:04:13 +0200 Subject: [PATCH] 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. --- src/tex2lyx/dummy_impl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.39.5