MSVC compiler error with boost ver 1.71
Hi there - I'm using boost ver 1.71 and I'm seeing a strange problem
with VS2019. Simply #including this line at the top of a source file
will generate a compiler error if I try to build in Debug mode (Release
builds are okay...)
#include
INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\CL.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Done building project "ardour.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Just wondering if anyone else has encountered this..? Thanks, John
On 23/06/2021 15:07, John Emmas via Boost-users wrote:
Hi there - I'm using boost ver 1.71 and I'm seeing a strange problem with VS2019. Simply #including this line at the top of a source file will generate a compiler error if I try to build in Debug mode (Release builds are okay...)
     #include
When I say a "compiler error" I'm not referring to one of the usual CXXXX messages - what happens is this:-
INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\CL.exe' Â Â Â Please choose the Technical Support command on the Visual C++ Â Â Â Help menu, or open the Technical Support help file for more information Done building project "ardour.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Just wondering if anyone else has encountered this..?
Thanks, John
I just tried using 1.76 using a simple c++ file and didn't have any
problems.
#include
On 23/06/2021 18:25, 😉 Good Guy 😉 via Boost-users wrote:
Are you compiling in command line or are you using the IDE?
My VS2019 is at version:
Visual Studio 2019 Developer Command Prompt v16.9.6
Huge thanks for trying this. I'm using the IDE and my VS version is currently 16.10.2
I used the cmd line using this:
cl /EHsc /I D:\Tmp\Boost\boost_1_76_0 boost.cpp /link /LIBPATH:D:\Tmp\Boost\boost_1_76_0\stage\lib
I'm not massively familiar with command line builds... is there something in there that would guarantee a Debug build? (I don't see the problem with a Release build...) Thanks, John
On 24/06/2021 07:56, John Emmas wrote:
Huge thanks for trying this. I'm using the IDE and my VS version is currently 16.10.2
I've just had a major breakthrough with this... after some further experiments this morning I've realised that the error only occurs if I set the following IDE property to "Yes" Configuration Properties->C++->Code Generation->Enable Minimal Rebuild Setting it to "No" fixes the compile problem - but having said that... for Debug builds I've had it set to "Yes" right back since the days of VS2005 and this is the first time it's ever caused any problem (but at least I now know there's a workaround...) I suspect this'll turn out to be an issue with VS2019 rather than with libboost - so I've reported it to the VS Development Community. Fingers crossed!! John
Depending on what toolset you're using you may well find that VC tells you that Minimal Rebuild (/Gm) is now deprecated. I've just looked at MS docs, which also say it's deprecated. In a lot of projects recently I've been having to turn off Minimal Rebuild and Function-Level Linking (actually setting them to "inherit from parent or project defaults", which removes the setting from the vcxproj file). I too have had it set since forever, but it may not even have been doing what I thought it did, so it may be no great loss. Regards, Richard.
-----Original Message----- From: Boost-users
On Behalf Of John Emmas via Boost-users Sent: 24 June 2021 11:45 To: boost-users@lists.boost.org Cc: John Emmas Subject: Re: [Boost-users] MSVC compiler error with boost ver 1.71 Caution! External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
On 24/06/2021 07:56, John Emmas wrote:
Huge thanks for trying this. I'm using the IDE and my VS version is currently 16.10.2
I've just had a major breakthrough with this... after some further experiments this morning I've realised that the error only occurs if I set the following IDE property to "Yes"
Configuration Properties->C++->Code Generation->Enable Minimal Rebuild
Setting it to "No" fixes the compile problem - but having said that... for Debug builds I've had it set to "Yes" right back since the days of VS2005 and this is the first time it's ever caused any problem (but at least I now know there's a workaround...)
I suspect this'll turn out to be an issue with VS2019 rather than with libboost - so I've reported it to the VS Development Community. Fingers crossed!!
John _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.b oost.org%2Fmailman%2Flistinfo.cgi%2Fboost- users&data=04%7C01%7Crichard.kerry%40atos.net%7C485f2833c7f94dc 2591b08d936fd3ea1%7C33440fc6b7c7412cbb730e70b0198d5a%7C0%7C0%7C 637601283573704304%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata =flfigMPyLZQHSLemciBAZjxP1Ta%2BqLkibgZLO9%2Bzokc%3D&reserved =0
On 24/06/2021 15:27, Kerry, Richard wrote:
Depending on what toolset you're using you may well find that VC tells you that Minimal Rebuild (/Gm) is now deprecated.
Ahhh... it suddenly makes sense now! For the past few months I've been seeing messages about /Gm being deprecated but I hadn't made the connection that /Gm == Minimal Rebuild. Thanks Richard. I'll just stop using it. John
participants (3)
-
John Emmas
-
Kerry, Richard
-
😉 Good Guy 😉