I encountered a puzzling problem when compiling a C++ source file using \'gcc\' on Ubuntu. Having solved the problem I would like to publish it here to save others the head
I had the same problem in compiling a C++ program with a MAKEFILE.
C++
MAKEFILE
I found an easy way to get rid of this problem and it is delete the existing binary file from the previous compile.
I could not identify the origin of the problem but That worked for me.