Can't Build Solution (Stuck on video #0)

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
SpookyMagazine
Posts: 1
Joined: July 6th, 2021, 3:18 am

Can't Build Solution (Stuck on video #0)

Post by SpookyMagazine » July 6th, 2021, 3:41 am

Hey, sorry if this has alredy been answered (if it has I have not found it anywhere). I'm starting the tutorial and because of this issue have yet to leave video #0. Basically I cannot "Build Solution", whenever I try to I get errors.
  • Error C2476 'constexpr' constructor does not initialize all members (compiling source file Game.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 45

    Error C2476 'constexpr' constructor does not initialize all members (compiling source file Graphics.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 45

    Error C2476 'constexpr' constructor does not initialize all members (compiling source file Main.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 45

    Error C2476 'constexpr' constructor does not initialize all members (compiling source file MainWindow.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 45

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file Game.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 47

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file Game.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 48

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file Graphics.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 47

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file Graphics.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 48

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file Main.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 47

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file Main.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 48

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file MainWindow.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 47

    Error C3249 illegal statement or sub-expression for 'constexpr' function (compiling source file MainWindow.cpp) Engine c:\users\---\desktop\chili_framework-master\engine\colors.h 48

They all seem to have something to do with the Colors section, but no clue what.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Can't Build Solution (Stuck on video #0)

Post by albinopapa » July 24th, 2021, 5:46 pm

Which version of Visual Studio did you install?
The issue stems from the fact the Color class in Color.h has some constexpr methods including the constructors. In earlier versions of VS there are some conflicts which without change to the framework seem to go away with newer versions of VS.

My advice is make sure you have the latest VS2019.

Barring that, the only other thing I would suggest is make sure that all members of a class that has constexpr constructor are initialized. This could also mean inline initialization or default member initialization.

For instance, the Color class has a member called 'dword'. The line should look like:

unsigned int dword = 0u;
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Post Reply