Forum Discussion
mka
11 years agoExplorer
Bug in ovr_math.h and unresolved symbol
I ran into the following 2 bugs while trying to compile my Visual C++ program modified for DK 2.
(I had a DK 1 version which ran fine.)
1. OVR_Math.h: Missing SingularityRadius
I had to replace Math< > with
// Single-precision Math constants class.
template<>
class Math<float>
{
public:
typedef double OtherFloatType;
static const float SingularityRadius; // 0.0000001f for Gimbal lock numerical problems
};
Same for Math<double>
This also meant I had to define these values in a .cpp file.
2. After fixing (1) I got an unresolved symbol error ( ___report_rangecheckfailure ) for a number of .obj files when linking. For example,
libovrd.lib(OVR_Win32_Socket.obj) : error LNK2019:
unresolved external symbol ___report_rangecheckfailure referenced in function "public: void __thiscall OVR::Net::SockAddr::Set(char const *,unsigned short,int)"
I haven't tracked that one down yet.
(I had a DK 1 version which ran fine.)
1. OVR_Math.h: Missing SingularityRadius
I had to replace Math< > with
// Single-precision Math constants class.
template<>
class Math<float>
{
public:
typedef double OtherFloatType;
static const float SingularityRadius; // 0.0000001f for Gimbal lock numerical problems
};
Same for Math<double>
This also meant I had to define these values in a .cpp file.
2. After fixing (1) I got an unresolved symbol error ( ___report_rangecheckfailure ) for a number of .obj files when linking. For example,
libovrd.lib(OVR_Win32_Socket.obj) : error LNK2019:
unresolved external symbol ___report_rangecheckfailure referenced in function "public: void __thiscall OVR::Net::SockAddr::Set(char const *,unsigned short,int)"
I haven't tracked that one down yet.
4 Replies
- cyberealityGrand ChampionWhat SDK version are you using? It must be really old cause I don't see that code.
- mkaExplorerI am using the SDK043Beta SDK. Look at the OVR_Math.h/cpp code there and compare it to those same files from the DK 1 SDKv023. The new code removed the SingularityRadius constant from the Math<...> classes but still referred to it in the code later on.
As far as the ___report_rangecheckfailure errors and several other unresolved external symbol errors is concerned, I have found the problem: I was using the VS2013 library rather than VS2010 library (I have Visual C++ 2010). - cyberealityGrand ChampionAh, I see. You are correct. I just got confused for a moment.
I've filed a bug report for this. - cyberealityGrand ChampionI have mentioned making a public bug tracker, and it's certainly a possibility.
Not sure if it can happen any time soon, so for now I will just have to scrape the forum and post them internally.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 7 months ago
- 8 years ago