1st error
Error 4 error C2371: 'int8_t' : redefinition; different basic types c:\users\minion\documents\visual studio 2008\library\bam2bed\stdint.h 82 BAM2BED
#include <limits.h>
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
// or compiler give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
#ifdef __cplusplus
extern "C" {
#endif
# include <wchar.h>
#ifdef __cplusplus
}
#endif
// Define _W64 macros to mark types changing their size, like intptr_t.
#ifndef _W64
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
# define _W64 __w64
# else
# define _W64
# endif
#endif
// 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t; //ERROR IS HERE
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
second error
Error 5 error C2039: 'isdigit' : is not a member of 'std' c:\users\minion\documents\visual studio 2008\library\bam2bed\bedfile.h 336 BAM2BED
// return the genome "bin" for a feature with this start and end
inline
BIN getBin(CHRPOS start, CHRPOS end) {
--end;
start >>= _binFirstShift;
end >>= _binFirstShift;
for (register short i = 0; i < _binLevels; ++i) {
if (start == end) return _binOffsetsExtended + start;
start >>= _binNextShift;
end >>= _binNextShift;
}
cerr << "start " << start << ", end " << end << " out of range in findBin (max is 512M)" << endl;
return 0;
}
/****************************************************
// isInteger(s): Tests if string s is a valid integer
*****************************************************/
inline bool isInteger(const std::string& s) {
int len = s.length();
for (int i = 0; i < len; i++) {
if (!std::isdigit(s)) return false; //ERROR IS HERE
}
return true;
}
// return the amount of overlap between two features. Negative if none and the
// number of negative bases is the distance between the two.
inline
int overlaps(CHRPOS aS, CHRPOS aE, CHRPOS bS, CHRPOS bE) {
return min(aE, bE) - max(aS, bS);
}
// is A after (to the right of) B?
inline
bool after(const BED &a, const BED &b) {
return (a.start >= b.end);
}
what might the fix be?