src/handler.o: In function `ApplicationHandler::CheckInput(bool*)':
handler.cpp:(.text+0x2d93): undefined reference to `std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)'
collect2: ld returned 1 exit status
I'm using g++44 to compile.
Any ideas as to why its happening?
PS: I'm using same commands in both Ubuntu and CentOS. The only difference is in linux distribution. nothing else.
An undefined reference to something means that you are missing a library to link to. Quite possibly (but highly unlikely) that the gcc for CentOS is not built/installed correctly since the undefined reference should be part of libstdc++.
Can you try the following command when linking and show the results (caution: it may be very long, use the program output tags):
Ok the problem seems with the gcc package in CentOS. The gcc package was old while the 'c files' require latest gcc package. I had to compile latest gcc from source since later than gcc4.4 was not available with Yum install.