You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like you might be trying to instantiate a int64_t without a type in N50.cc?
Apparently this causes g++ compiler problems.
Test environment is Alpine.
/shendurelab-LACHESIS-2e27abb # make
Making all in src/include/gtools
make[1]: Entering directory '/shendurelab-LACHESIS-2e27abb/src/include/gtools'
Makefile:476: warning: ignoring prerequisites on suffix rule definition
g++ -c N50.cc -Wall -ansi -pedantic -g -O3 -std=c++11
N50.cc:32:10: error: ISO C++ forbids declaration of 'int64_t' with no type [-fpermissive]
32 | template int64_t N50( const vector<int64_t> & v );
| ^~~~~~~
N50.cc:32:10: error: 'int64_t' is not a template function
N50.cc:32:17: error: expected ';' before 'N50'
32 | template int64_t N50( const vector<int64_t> & v );
| ^~~~
| ;
N50.cc: In function 'T N50(const std::vector<T>&)':
N50.cc:45:3: error: 'int64_t' was not declared in this scope
45 | int64_t sum = accumulate( v.begin(), v.end(), (int64_t) 0 );
| ^~~~~~~
N50.cc:46:10: error: expected ';' before 'half'
46 | int64_t half = 0;
| ^~~~~
| ;
N50.cc:54:5: error: 'half' was not declared in this scope
54 | half += sorted_v[i];
| ^~~~
N50.cc:55:22: error: 'sum' was not declared in this scope
55 | if ( 2 * half == sum && i < sorted_v.size() - 1 )
| ^~~
N50.cc:57:22: error: 'sum' was not declared in this scope
57 | if ( 2 * half >= sum ) return sorted_v[i];
| ^~~
make[1]: *** [Makefile:476: N50.o] Error 1
make[1]: Leaving directory '/shendurelab-LACHESIS-2e27abb/src/include/gtools'
make: *** [Makefile:402: all-recursive] Error 1
The text was updated successfully, but these errors were encountered:
Hello.
It looks like you might be trying to instantiate a int64_t without a type in N50.cc?
Apparently this causes g++ compiler problems.
Test environment is Alpine.
The text was updated successfully, but these errors were encountered: