Hi,
Having a major problem with the QNX IDE. I have a file called ariaUtil.h which contains maths utilities for robotics. When the file contains only this:
#ifndef ARIAUTIL_H
#define ARIAUTIL_H
#include
#include
#include <math.h>
#ifdef WIN32
#include <sys/timeb.h>
#endif
#ifdef linux
#include <sys/time.h>
#include <unistd.h>
#endif
//QNX Macros
#ifdef qnx
#include <sys/time.h>
#include <unistd.h>
#endif
#ifdef QNX
#include <sys/time.h>
#include <unistd.h>
#endif
//end QNX macros
#include “ariaTypedefs.h”
#include “ArLog.h”
#include “ariaInternal.h”
#ifndef M_PI
#define M_PI 3.1415927
#endif // of M_PI, windows has a function call instead of a define
/// This class has utility functions
class ArUtil
{
public:
/// Values for the bits from 0 to 16
enum BITS {
BIT0 = 0x1, ///< value of BIT0
BIT1 = 0x2, ///< value of BIT1
BIT2 = 0x4, ///< value of BIT2
BIT3 = 0x8, ///< value of BIT3
BIT4 = 0x10, ///< value of BIT4
BIT5 = 0x20, ///< value of BIT5
BIT6 = 0x40, ///< value of BIT6
BIT7 = 0x80, ///< value of BIT7
BIT8 = 0x100, ///< value of BIT8
BIT9 = 0x200, ///< value of BIT9
BIT10 = 0x400, ///< value of BIT10
BIT11 = 0x800, ///< value of BIT11
BIT12 = 0x1000, ///< value of BIT12
BIT13 = 0x2000, ///< value of BIT13
BIT14 = 0x4000, ///< value of BIT14
BIT15 = 0x8000, ///< value of BIT15
};
/// Sleep for the given number of milliseconds
AREXPORT static void sleep(unsigned int ms);
/// Get the time in milliseconds
AREXPORT static unsigned int getTime(void);
#endif // ARIAUTIL_H
The file opens without any problems in the IDE.
However if I add the function :
/// Delete all members of a set. Does NOT empty the set.
/**
Assumes that T is an iterator that supports the operator**, operator!=
and operator++. The return is assumed to be a pair. The second value of
the pair is assumed to be a pointer to a class that needs to be deleted.
*/
template static void deleteSetPairs(T begin, T end)
{
for (; begin != end; ++begin)
{
delete (*begin).second;
}
}
The whole IDE crashes!!
Can somebody please help??!
Thanks,
RK