Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22063

Compiling program for old gcc

$
0
0

I have to compile program probcons but there are many errors. In readme autor writes program is compatible with gcc 4.3 but I have only 4.7.2. Is there any way to compile this old program? I don't believe that in program are errors because many bioinformatics servers are using it.

Most odd to me is this error:

Description                 Resource         Path       Location    Typeexpected ‘)’ before ‘size’  SafeVector.h    /probcons   line 27 C/C++ Problemexpected ‘)’ before ‘size’  SafeVector.h    /probcons   line 26 C/C++ Problem

In class SafeVector.h:

/////////////////////////////////////////////////////////////////// SafeVector.h//// STL vector with array bounds checking.  To enable bounds// checking, #define ENABLE_CHECKS./////////////////////////////////////////////////////////////////#ifndef SAFEVECTOR_H#define SAFEVECTOR_H#include <cassert>#include <vector>/////////////////////////////////////////////////////////////////// SafeVector//// Class derived from the STL std::vector for bounds checking./////////////////////////////////////////////////////////////////template<class TYPE>class SafeVector : public std::vector<TYPE>{ public:  // miscellaneous constructors  SafeVector() : std::vector<TYPE>() {}  /*ERROR HERE*/ SafeVector(size_t size) : std::vector<TYPE>(size) {}  /*ERROR HERE*/ SafeVector(size_t size, const TYPE &value) : std::vector<TYPE>(size, value) {}  SafeVector(const SafeVector &source) : std::vector<TYPE>(source) {}#ifdef ENABLE_CHECKS  // [] array bounds checking  TYPE &operator[](int index){    assert (index >= 0 && index < (int) size());    return std::vector<TYPE>::operator[] ((size_t) index);  }  // [] const array bounds checking  const TYPE &operator[] (int index) const {    assert (index >= 0 && index < (int) size());    return std::vector<TYPE>::operator[] ((size_t) index) ;  }#endif};

How it is possible that in older version of gcc wasn't need includes and std::prefix?


Viewing all articles
Browse latest Browse all 22063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>