#C++ track Meetup exercise - Issue working locally

17 messages · Page 1 of 1 (latest)

cedar niche
#

Heyas. I've downloaded the Meetup exercise in the C++ track to work locally, and when I open it in Visual Studio Community 2022, I immediately get a CMake error that it can't find the Boost libraries:

Severity Code Description Project File Line Suppression State Error CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR date_time) (Required is at least version "1.58") C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake 230

I do have the latest version of Boost on my computer. According to the Boost documentation, the date_time is a header-only library and shouldn't need to be built, but there's little guidance in getting Visual Studio to find it. Any help would be much appreciated.

hidden elk
cedar niche
#

Ended up being a bit different from that page with CMake involved, but I think I got it sorted by fixing this. Though now when I add the #include "boost/date_time/gregorian/gregorian.hpp" it triggers 97 various errors in concept_check.hpp (in the root/boost/ folder)

hidden elk
#

Ah sorry, missed the part about CMake somehow..

cedar niche
#

this is what I set so that it finds the boost library, though on my desktop it WAS set to the location of an earlier version of boost, and I'm not certain why it still wasn't finding it. I got that part working with the latest version, now, but when I try to include the gregorian.hpp, the concept_check.hpp in boost triggers 90+ other errors

hidden elk
#

Ah okay, could you paste some of the errors here?

cedar niche
#

Several instances of these errors:
Severity Code Description Project File Line Suppression State Error (active) E0020 identifier "BOOST_PP_IIF_BOOST_PP_BOOL_" is undefined meetup.exe - x64-Debug C:\local\boost_1_82_0\boost\concept_check.hpp 70

Severity Code Description Project File Line Suppression State Error (active) E0254 type name is not allowed meetup.exe - x64-Debug C:\local\boost_1_82_0\boost\concept_check.hpp 80

Severity Code Description Project File Line Suppression State Error (active) E0442 too few arguments for class template "boost::Integer" meetup.exe - x64-Debug C:\local\boost_1_82_0\boost\concept_check.hpp 80

Severity Code Description Project File Line Suppression State Error (active) E0020 identifier "BOOST_PP_IIF_BOOST_PP_BOOL_" is undefined meetup.exe - x64-Debug C:\local\boost_1_82_0\boost\concept_check.hpp 135

hidden elk
cedar niche
#

yes. I created a regular C++ visual studio project, added that file and updated the included the file path to the V++ includes that you initially pointed out and it does compile successfully in that case. I tried adding it to the exercise folder, but I didn't see an option to compile a single file. not sure if it's because the exercises are CMake or not.

hidden elk
#

Hm, the CMake file in the exercise is trying to locate Boost 1.58, but it looks like you're using 1.82?

cedar niche
#

my understanding was that 1.58 was simply the minimum version needed

#

and it's a fairly old version at this point

hidden elk
#

Yeah, maybe, idk..

cedar niche
#

ok well weird thing... on this machine, after having built print_month.cpp in a standard VS project and reopening the meetup exercise, those errors are now gone. 🤷 I'll try this on the desktop later and hopefully it'll magically fix itself there too. if not i"ll just do this one on the laptop. thanks for the help!

hidden elk
#

Huh, that's weird..

cedar niche
#

yep. and I consistently had those errors immediately after getting the link to boost fixed on both machines. computers sure are funny sometimes