I'm trying to modify some C++ files in ns2 and then recompile using make command. Although new .o file is created after make, the output is similar to that of previous C++ file (before modifying). Can someone suggest what may be the reason behind it?
1 Answer
Are you modifying .cpp (or .C .cc etc.) files or header files? Some Makefiles are written very poorly and don't have decent dependency information (gcc -MMD
or makedepend
). This means the project is not rebuild correctly if you modify some files (often header files). You can check what files are triggered by modification (and why) with the command:
make --debug=b -n
make clean
beforemake
. This removes the old .o files and creates new ones. So you completely recompile it.