]> git.lyx.org Git - lyx.git/commitdiff
Fix tex2lyx linker error on windows
authorGeorg Baum <baum@lyx.org>
Wed, 8 Apr 2015 20:04:13 +0000 (22:04 +0200)
committerGeorg Baum <baum@lyx.org>
Wed, 8 Apr 2015 20:06:51 +0000 (22:06 +0200)
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

index 9e9c3107292c563fc7286b4d3d2db4f9dc1aa10b..7807a7d2d8a3b965a6be678099d4235550c5b714 100644 (file)
@@ -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;
 }