Visual studio build errors


#1

CMake build went well, but I get a host of errors when I build inside VS:

Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	908	
	Error (active)	E2422	defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsDegree.h	24	
	Error (active)	E2422	defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsRadian.h	25	
	Error (active)	E2422	defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsVector2I.h	20	
	Error (active)	E2422	defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Utility\BsUUID.h	21	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	902	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	903	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	904	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	905	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	906	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	907	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	909	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	911	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\String\BsStringID.h	46	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\String\BsStringID.h	124	
	Error (active)	E0028	expression must have a constant value	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\String\BsStringID.h	125	
	Error (active)	E0145	member "bs::Math::BIGGEST_FLOAT_SMALLER_THAN_ONE" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	20	
	Error (active)	E0145	member "bs::Math::DEG2RAD" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	908	
	Error (active)	E0145	member "bs::Math::HALF_PI" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	903	
	Error (active)	E0145	member "bs::Math::INV_HALF_PI" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	906	
	Error (active)	E0145	member "bs::Math::INV_PI" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	905	
	Error (active)	E0145	member "bs::Math::INV_SQRT2" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	911	
	Error (active)	E0145	member "bs::Math::INV_TWO_PI" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	907	
	Error (active)	E0145	member "bs::Math::NEG_INFINITY" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	900	
	Error (active)	E0145	member "bs::Math::PI" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	901	
	Error (active)	E0145	member "bs::Math::POS_INFINITY" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	899	
	Error (active)	E0145	member "bs::Math::QUARTER_PI" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	904	
	Error (active)	E0145	member "bs::Math::RAD2DEG" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	909	
	Error (active)	E0145	member "bs::Math::SQRT2" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	910	
	Error (active)	E0145	member "bs::Math::TWO_PI" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\Math\BsMath.h	902	
	Error (active)	E0145	member "bs::StringID::ELEMENTS_PER_CHUNK" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\String\BsStringID.h	28	
	Error (active)	E0145	member "bs::StringID::HASH_TABLE_SIZE" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\String\BsStringID.h	26	
	Error (active)	E0145	member "bs::StringID::MAX_CHUNK_COUNT" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\String\BsStringID.h	27	
	Error (active)	E0145	member "bs::StringID::STRING_SIZE" may not be initialized	myApp	C:\Users\me\source\libs\bsf\include\bsfUtility\String\BsStringID.h	29	
	Error	LNK1112	module machine type 'x64' conflicts with target machine type 'x86'	myApp	C:\Users\me\source\repos\bsf\bsf\build\bsf.lib(bsf.dll)	1

#2

I see 34 of the errors where intellisense issues. But I still have the last one:

Error	LNK1112	module machine type 'x64' conflicts with target machine type 'x86'	myApp	C:\Users\me\source\repos\bsf\bsf\build\bsf.lib(bsf.dll)	1

I never build anything for x64 only; that’s like general rule that I hear always and everywhere, since x64 only is limited. So can I not use this framework for x86? I’ve set build and debug configuration to x64, but same error repeats.


#3

I think I managed to get everything into x64. I don’t remember how, and I suppose I will struggle again on my other machine.


#4

32-bit builds aren’t very well supported. It probably wouldn’t take much to get it working, but generally I don’t test them so there will be issues. Also we don’t supply 32-bit dependencies, so you’d need to compile all of them yourself.