MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.72k stars 1.64k forks source link

error C3861: 'isinf': identifier not found and error C3861: 'isnan': identifier not found #26

Open Reena24 opened 10 years ago

Reena24 commented 10 years ago

when i try to build the program for structure from motion in OpenCV i get the error 1>------ Build started: Project: Sfm, Configuration: Release Win32 ------ 1>Compiling... 1>BundleAdjuster.cpp 1>C:\Users\Reeba\Downloads\Programs\SSBA-3.0\Math/v3d_mathutilities.h(433) : error C3861: 'isinf': identifier not found 1>C:\Users\Reeba\Downloads\Programs\SSBA-3.0\Math/v3d_mathutilities.h(433) : error C3861: 'isnan': identifier not found 1>Build log was saved at "file://c:\Users\Reeba\Documents\Visual Studio 2008\Projects\Sfm\Sfm\Release\BuildLog.htm" 1>Sfm - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

when i add the lines

ifndef isinf

define isinf(x) ((x)!=(x))

endif

ifndef isnan

define isnan(x) ((x)!=(x))

endif

to v3d_mathutilities.h i get a lot of link errors

1>------ Build started: Project: Sfm, Configuration: Release Win32 ------ 1>Compiling... 1>BundleAdjuster.cpp 1>Linking... 1>BundleAdjuster.obj : error LNK2001: unresolved external symbol "public: void thiscall V3D::SparseLevenbergOptimizer::minimize(void)" (?minimize@SparseLevenbergOptimizer@V3D@@QAEXXZ) 1>BundleAdjuster.obj : error LNK2001: unresolved external symbol "public: virtual void thiscall V3D::MetricBundleOptimizerBase::updateParametersB(struct V3D::VectorArray const &)" (?updateParametersB@MetricBundleOptimizerBase@V3D@@UAEXABU?$VectorArray@N@2@@Z)

I dont know what I have to do for such type of errors. I have been stuck with this code for sometime. Please Help. Its urgent