an error building ARtoolkit+ using VC++ 10

Asked by sampie

hi,

i m having some troubles in building ARtoolkitPlus:

i m under windows and i edited the file CMakeList.txt to fixe the bug but when i compile the project i get this errors:

//Error

------ Début de la génération : Projet : ZERO_CHECK, Configuration : Debug Win32 ------
  Checking Build System
  CMake does not need to re-run because C:/ARplus/CMakeFiles/generate.stamp is up-to-date.
------ Début de la génération : Projet : ARToolKitPlus, Configuration : Debug Win32 ------
  Building Custom Rule C:/ARToolKitPlus-2.2.1/CMakeLists.txt
  CMake does not need to re-run because C:\ARplus\CMakeFiles\generate.stamp is up-to-date.
  Camera.cpp
  Tracker.cpp
  TrackerMultiMarker.cpp
  TrackerSingleMarker.cpp
  arBitFieldPattern.cpp
  arDetectMarker.cpp
  arDetectMarker2.cpp
  arGetCode.cpp
  arGetInitRot2.cpp
  arGetMarkerInfo.cpp
  arGetTransMat.cpp
  arGetTransMat2.cpp
..\ARToolKitPlus-2.2.1\src\core\arGetTransMat2.cpp(47): error C2065: 'M_PI' : identificateur non déclaré
..\ARToolKitPlus-2.2.1\src\core\arGetTransMat2.cpp(120): error C2065: 'M_PI' : identificateur non déclaré
  arGetTransMat3.cpp
  arGetTransMatCont.cpp
  arLabeling.cpp
  arMultiActivate.cpp
  arMultiGetTransMat.cpp
  arMultiGetTransMatHull.cpp
  arMultiReadConfigFile.cpp
  arUtil.cpp
  Génération de code en cours...
  Compilation en cours...
  matrix.cpp
  mPCA.cpp
  paramDecomp.cpp
  paramDistortion.cpp
  rppGetTransMat.cpp
  rppMultiGetTransMat.cpp
  vector.cpp
  BCH.cpp
  Hull.cpp
  arGetInitRot2Sub.cpp
  librpp.cpp
  rpp.cpp
..\ARToolKitPlus-2.2.1\src\librpp\rpp.cpp(127): error C2065: 'M_PI_2' : identificateur non déclaré
..\ARToolKitPlus-2.2.1\src\librpp\rpp.cpp(137): error C2065: 'M_PI_2' : identificateur non déclaré
..\ARToolKitPlus-2.2.1\src\librpp\rpp.cpp(139): error C2065: 'M_PI_2' : identificateur non déclaré
..\ARToolKitPlus-2.2.1\src\librpp\rpp.cpp(139): fatal error C1903: impossible de récupérer à partir des erreurs précédentes ; arrêt de la compilation
  rpp_quintic.cpp
..\ARToolKitPlus-2.2.1\src\librpp\rpp_quintic.cpp(272): error C2065: 'M_PI' : identificateur non déclaré
  rpp_svd.cpp
  rpp_vecmat.cpp
  Génération de code en cours...
------ Début de la génération : Projet : ALL_BUILD, Configuration : Debug Win32 ------
  Building Custom Rule C:/ARToolKitPlus-2.2.1/CMakeLists.txt
  CMake does not need to re-run because C:\ARplus\CMakeFiles\generate.stamp is up-to-date.
========== Génération : 2 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

//-------

thanks for your help

Question information

Language:
English Edit question
Status:
Solved
For:
ARToolKitPlus Edit question
Assignee:
No assignee Edit question
Solved by:
sampie
Solved:
Last query:
Last reply:
Revision history for this message
sampie (raouf-najjar) said :
#1

 in order to build successfully you need to add #define _USE_MATH_DEFINES
to the file that use cmath;
for more information :

http://www.cppfrance.com/forum/sujet-JE-DEBUTE-PREMIERE-INTERROGATION_337551.aspx

BUT it doesn't seem to be a solution for my problem because the error style the same

i will try to define M_PI and M_PI_2to see if it resolve the problem.

Revision history for this message
sampie (raouf-najjar) said :
#2

solved