dxerr.lib error running Chili Framework

The Partridge Family were neither partridges nor a family. Discuss.
Katamory
Posts: 1
Joined: October 20th, 2019, 1:31 pm

Re: dxerr.lib error running Chili Framework

Post by Katamory » October 20th, 2019, 1:53 pm

Hi, I have a simular problem, although I don't really know if it is the same.
As soon as I clicked the "build solution" button, it showed 12 errors, all in the Colors.h folder. It says "illegal statement or sub-expression for 'constexpr' function (compiling source file **** )" I am a complete noob, I'm sure there is a simple solution for this, but I don't want to screw up something by accident.

https://ibb.co/D5vSsjd - this is a link to a picture of the screen. If everything is right.

Thank you for any answers in advance!

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: dxerr.lib error running Chili Framework

Post by chili » October 21st, 2019, 5:55 pm

That's not build errors, but rather the intellisense engine linting your code and trying to point out error before you build. Unfortunately, Intellisense quite often fucks up. Build it and show the /Output/ window. That's where the real errors are.
Chili

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

Re: dxerr.lib error running Chili Framework

Post by albinopapa » October 22nd, 2019, 1:43 am

Yeah, I've explained this before on here somewhere, but would be probably pretty difficult to find if you aren't looking for it...if it's the same situation as I'm thinking.

The parameters for Color are unsigned char which is fine because color channels are only 8 bits wide. However, the constructor bitwise or's together the 3-4 values to make a 32 bit value, which doesn't fit into an unsigned char. Doing the or and shift operations on chars promotes them to ints which the compiler complains if the values being passed to the constructor and or'd together are over std::numeric_limits<int>::max(). If you however change the parameters to unsigned ints instead of unsigned chars, the "errors" will go away, but that does have other side effects.
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