Boost in LyX

Thibaut Cuvelier tcuvelier at lyx.org
Sat Nov 21 19:03:35 UTC 2020


On Sat, 21 Nov 2020 at 19:54, Yuriy Skalko <yuriy.skalko at gmail.com> wrote:

> >
> > I like them, but a couple remarks.
> >
> > * patch 2: broken indentation
> >
> >                 if (!current_view_
> > -                   || (!lyxrc.open_buffers_in_tabs
> > -                       && current_view_->documentBufferView() != 0
> > -                       && !is_open)) {
> > +                       || (!lyxrc.open_buffers_in_tabs
> > +                               && current_view_->documentBufferView()
> != 0
> > +                               && !is_open)) {
> >
>
> I "broke" it because now condition and nested block have same level of
> indentation and it is hard to see where they are separated. Comment
> helps but still...
>
> >
> > * concerning std::any, currently with autoconf we enforce c++14 when
> available. I could move to C++17 instead (the idea is to avoid caring with
> code that becomes wrong with new standard when we do not use the standard).
>
> I'm not sure if I understood the last phrase correctly, but probably
> `boost::any` have no problems when compiling in newer standard modes. So
> please decide what is the best.
>
> >
> > Two ideas for more cleanups:
> >
> > 1/ we still have a few for_each() uses.
> >
> > 2/ if we require gcc 4.9, then we can use std::regex. I think there was
> a need of boost:regex on windows side, is it still true ?
> >
> >
> > JMarc
>
> Yes, I've already thought about std::regex. It compiles flawlessly with
> attached patch on Windows/MinGW64/GCC7. Now we need some testing on
> MSVC. Probably Eugene can help here.
>

It compiles flawlessly with MSVC 2019 (16.7.1):

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>cl /v
> Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
> Copyright (C) Microsoft Corporation.  All rights reserved.
>

However, it fails when linking (but I'm not sure it's related, it's been at
least ten commits since my last build), with things related to
lyx::support::checksum:

LINK Pass 1: command
> "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x64\link.exe
> /nologo @CMakeFiles\LyX.dir\objects1.rsp /out:..\bin\LyX.exe
> /implib:..\bin\LyX.lib
> /pdb:D:\LyX\lyx-unstable\cmake-build-debug\bin\LyX.pdb /version:0.0
> /machine:x64 /debug /INCREMENTAL /subsystem:console ..\bin\mathed.lib
> ..\bin\insets.lib ..\bin\frontends.lib ..\bin\frontend_qt.lib
> ..\bin\graphics.lib ..\bin\support.lib ..\bin\mytheslibstatic.lib
> ..\bin\iconv.lib ..\bin\hunspell.lib ..\bin\frontends.lib
> D:\Qt\5.15.0\msvc2019_64\lib\Qt5Concurrentd.lib
> D:\Qt\5.15.0\msvc2019_64\lib\Qt5Svgd.lib
> D:\Qt\5.15.0\msvc2019_64\lib\Qt5Widgetsd.lib
> D:\Qt\5.15.0\msvc2019_64\lib\Qt5WinExtrasd.lib gdi32.lib
> D:\Qt\5.15.0\msvc2019_64\lib\Qt5Guid.lib
> D:\Qt\5.15.0\msvc2019_64\lib\Qt5Cored.lib ..\bin\zlibstaticd.lib
> shlwapi.lib psapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib
> shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
> /MANIFEST /MANIFESTFILE:CMakeFiles\LyX.dir/intermediate.manifest
> CMakeFiles\LyX.dir/manifest.res" failed (exit code 1120) with the following
> output:
> ConverterCache.cpp.obj : error LNK2019: unresolved external symbol
> "unsigned long __cdecl lyx::support::checksum(class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)" (?checksum at support@lyx@
> @YAKAEBV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z)
> referenced in function "public: __cdecl lyx::`anonymous
> namespace'::CacheItem::CacheItem(class lyx::support::FileName const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &,__int64,unsigned long)" (??0CacheItem@
> ?A0xe64ddb33 at lyx@@QEAA at AEBVFileName@support at 2@AEBV?$basic_string at DU
> ?$char_traits at D@std@@V?$allocator at D@2@@std@@_JK at Z)
> frontend_qt.lib(GuiApplication.cpp.obj) : error LNK2001: unresolved
> external symbol "unsigned long __cdecl lyx::support::checksum(class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)" (?checksum at support@lyx@
> @YAKAEBV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z)
> frontend_qt.lib(GuiClipboard.cpp.obj) : error LNK2001: unresolved external
> symbol "unsigned long __cdecl lyx::support::checksum(class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)" (?checksum at support@lyx@
> @YAKAEBV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z)
> support.lib(FileName.cpp.obj) : error LNK2019: unresolved external symbol
> "unsigned long __cdecl lyx::support::checksum(class
> std::basic_ifstream<char,struct std::char_traits<char> > &)"
> (?checksum at support@lyx@@YAKAEAV?$basic_ifstream at DU?$char_traits at D@std@
> @@std@@@Z) referenced in function "unsigned long __cdecl
> lyx::support::checksum_ifstream_fallback(char const *)"
> (?checksum_ifstream_fallback at support@lyx@@YAKPEBD at Z)
> ..\bin\LyX.exe : fatal error LNK1120: 2 unresolved externals
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201121/a4813a0e/attachment-0001.html>


More information about the lyx-devel mailing list