Everything was working with no issues on my previous machine. However, I moved to a different university, so I was forced to used a different computer: Ubuntu 17.04 64bit with this kernel 4.10.0-21-generic. (The result were the same(meaning not compiling the program) on ubuntu 16.04 on this computer).
Unfortunately I dont have info about the previous PC, but I know the program was compiling with no issues on 3 more computers. So my guess is the problem could be in libraries or something like that. Unfortunately I am mostly changing mathematical formulations etc in single files (like hypo.cc etc) and I am not clearly familiar with the full structure of the whole program. Any ideas what could be wrong?
I clear all the .o files and then while compiling I receive this error, even tho I didnt touch the main.cc file for ages.
Cannot paste the whole error due to lenght, but it seems to be repeating.
asdf@computer:~/hypo/newtriax$ make triax
g++ -g -c ./math.cc
g++ -g -c ./rules.cc
g++ -g -c ./unsat.cc
g++ -g -c ./tskh.cc
g++ -g -c ./hypo.cc
g++ -g -c ./count.cc
g++ -g -c ./countgen.cc
g++ -g -c ./tests.cc
g++ -g -c ./testsgen.cc
g++ -g -c ./generalmod.cc
g++ -g -c ./main.cc
./main.cc: In member function ‘void Input::main(char*, char*)’:
./main.cc:161:8: error: no match for ‘operator==’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘long int’)
if (in==NULL) {
^
./main.cc:161:8: note: candidate: operator==(int, long int) <built-in>
./main.cc:161:8: note: no known conversion for argument 1 from ‘std::ifstream {aka std::basic_ifstream<char>}’ to ‘int’
In file included from /usr/include/c++/6/iosfwd:40:0,
from /usr/include/c++/6/ios:38,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from ./triax.h:22,
from ./main.cc:22:
/usr/include/c++/6/bits/postypes.h:216:5: note: candidate: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
^~~~~~~~
/usr/include/c++/6/bits/postypes.h:216:5: note: template argument deduction/substitution failed:
In file included from /usr/include/string.h:32:0,
from /usr/include/c++/6/cstring:42,
from ./triax.h:24,
from ./main.cc:22:
./main.cc:161:10: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘const std::fpos<_StateT>’
if (in==NULL) {
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from ./triax.h:22,
from ./main.cc:22:
/usr/include/c++/6/bits/stl_pair.h:435:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:435:5: note: template argument deduction/substitution failed:
In file included from /usr/include/string.h:32:0,
from /usr/include/c++/6/cstring:42,
from ./triax.h:24,
from ./main.cc:22:
./main.cc:161:10: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘const std::pair<_T1, _T2>’
if (in==NULL) {
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from ./triax.h:22,
from ./main.cc:22:
/usr/include/c++/6/bits/stl_iterator.h:292:5: note: candidate: template<class _Iterator> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator==(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:292:5: note: template argument deduction/substitution failed:
In file included from /usr/include/string.h:32:0,
from /usr/include/c++/6/cstring:42,
from ./triax.h:24,
from ./main.cc:22:
./main.cc:161:10: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (in==NULL) {
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from ./triax.h:22,
from ./main.cc:22:
/usr/include/c++/6/bits/stl_iterator.h:349:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator==(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:349:5: note: template argument deduction/substitution failed:
In file included from /usr/include/string.h:32:0,
from /usr/include/c++/6/cstring:42,
from ./triax.h:24,
from ./main.cc:22:
./main.cc:161:10: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (in==NULL) {
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from ./triax.h:22,
from ./main.cc:22:
/usr/include/c++/6/bits/stl_iterator.h:1113:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator==(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1113:5: note: template argument deduction/substitution failed:
In file included from /usr/include/string.h:32:0,
from /usr/include/c++/6/cstring:42,
from ./triax.h:24,
from ./main.cc:22:
./main.cc:161:10: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (in==NULL) {
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from ./triax.h:22,
from ./main.cc:22:
/usr/include/c++/6/bits/stl_iterator.h:1119:5: note: candidate: template<class _Iterator> bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator==(const move_iterator<_Iterator>& __x,
^~~~~~~~
Why do you want to compare the state of your file stream to the null pointer?
The stream is either valid or not; it doesn't make much sense to compare it against NULL.