Author: Sagar Behera (behere@kth.se) Date: August 2009 ---------------------------------- It seems that the mpk was designed for old versions of gcc and does not compile cleanly on recent versions. I am using Ubuntu Jaunty Jackalope with gcc-4.3.3 and compilation grinds to a halt almost immediately. For the list of errors, see attached file "compilation_issues.txt" (or see at the end) In order to fix these, I did the following 1) Replace the in mpkTransform.H with using namespace __gnu_cxx; 2) Added #include after #include in mpk_defs.h 3) Added #include to mpkTransform.H 4) Replaced with in sblPlanner.cpp and sblRn.cpp That's it, I think. However even with these changes, gcc spits out warnings that the code is using deprecated functions, which will be removed without warning in future versions. But at least it compiled the library and the demo programs. ----------------------------- ----------------------------- "compilation_issues.txt": ----------------------------- sagar@MaybeMagic:~/mpk_v1.0$ make cd basic; make; make[1]: Entering directory `/home/sagar/mpk_v1.0/basic' g++ -c -O2 -DADAPT_COLLCHECKER=1 -DTRANSFORM_CACHE=1 -I. -I../robots -I/usr/X11R6/include -I/home/sagar/PQP_v1.3/src -I/home/sagar/ball mpkBaseRobot.cpp -o mpkBaseRobot.o In file included from mpkBaseRobot.H:15, from mpkBaseRobot.cpp:2: mpkTransformCache.H:4:22: error: hash_map.h: No such file or directory In file included from mpkBaseRobot.H:8, from mpkBaseRobot.cpp:2: mpk_defs.h: In function ¡Ævoid mpk_exit(int)¡Ç: mpk_defs.h:20: error: ¡Æexit¡Ç was not declared in this scope In file included from mpkBaseRobot.H:12, from mpkBaseRobot.cpp:2: mpkTransform.H: In constructor ¡ÆmpkTransform::mpkTransform(mpkTransform::TYPE, int, void (*)(mpkTransform&, const double*), void (*)(mpkTransform&, const double*))¡Ç: mpkTransform.H:328: error: ¡Æexit¡Ç was not declared in this scope In file included from mpkBaseRobot.H:15, from mpkBaseRobot.cpp:2: mpkTransformCache.H: At global scope: mpkTransformCache.H:103: error: ISO C++ forbids declaration of ¡Æhash_map¡Ç with no type mpkTransformCache.H:103: error: expected ¡Æ;¡Ç before ¡Æ<¡Ç token mpkTransformCache.H:104: error: ISO C++ forbids declaration of ¡Æhash_map¡Ç with no type mpkTransformCache.H:104: error: expected ¡Æ;¡Ç before ¡Æ<¡Ç token mpkTransformCache.H: In constructor ¡ÆmpkTransformCache::mpkTransformCache(int)¡Ç: mpkTransformCache.H:30: error: ¡Æcache¡Ç was not declared in this scope mpkTransformCache.H: In member function ¡Ævoid mpkTransformCache::clear()¡Ç: mpkTransformCache.H:36: error: ¡Æcache¡Ç was not declared in this scope mpkTransformCache.H: In member function ¡Æbool mpkTransformCache::insert(const mpkTransform&, unsigned int, unsigned int, unsigned int)¡Ç: mpkTransformCache.H:44: error: ¡Æcache¡Ç was not declared in this scope mpkTransformCache.H:44: error: ¡Æhash_map¡Ç was not declared in this scope mpkTransformCache.H:44: error: expected primary-expression before ¡Æ,¡Ç token mpkTransformCache.H:44: error: expected primary-expression before ¡Æ,¡Ç token mpkTransformCache.H:44: error: expected primary-expression before ¡Æ,¡Ç token mpkTransformCache.H:44: error: expected primary-expression before ¡Æ>¡Ç token mpkTransformCache.H:45: error: ¡Æ::value_type¡Ç has not been declared mpkTransformCache.H: In member function ¡Æbool mpkTransformCache::load(mpkTransform&, unsigned int, unsigned int, unsigned int)¡Ç: mpkTransformCache.H:54: error: ¡Æit¡Ç was not declared in this scope mpkTransformCache.H:54: error: ¡Æcache¡Ç was not declared in this scope mpkBaseRobot.cpp: In constructor ¡ÆmpkBaseRobot::mpkBaseRobot(const char*, const char*, const mpkTransform&, double)¡Ç: mpkBaseRobot.cpp:186: error: ¡Ægetenv¡Ç was not declared in this scope mpkBaseRobot.cpp:244: error: ¡Æatof¡Ç was not declared in this scope mpkBaseRobot.cpp:250: error: ¡Æatof¡Ç was not declared in this scope mpkBaseRobot.cpp:257: error: ¡Æatof¡Ç was not declared in this scope mpkBaseRobot.cpp:266: error: ¡Æatof¡Ç was not declared in this scope mpkBaseRobot.cpp:275: error: ¡Æatof¡Ç was not declared in this scope mpkBaseRobot.cpp:288: error: ¡Æatoi¡Ç was not declared in this scope mpkBaseRobot.cpp:341: error: ¡Æatoi¡Ç was not declared in this scope mpkBaseRobot.cpp:354: error: ¡Æatof¡Ç was not declared in this scope mpkBaseRobot.cpp:358: error: ¡Æatof¡Ç was not declared in this scope mpkBaseRobot.cpp: In function ¡Ævoid show_sphere(mpkBaseRobot::Joint*, int, int, double*, double)¡Ç: mpkBaseRobot.cpp:678: error: ¡Ægetenv¡Ç was not declared in this scope mpkBaseRobot.cpp:679: error: ¡Æatoi¡Ç was not declared in this scope mpkBaseRobot.cpp:681: error: ¡Æatoi¡Ç was not declared in this scope make[1]: *** [mpkBaseRobot.o] Error 1 make[1]: Leaving directory `/home/sagar/mpk_v1.0/basic' make: *** [libs] Error 2 sagar@MaybeMagic:~/mpk_v1.0$