yarl: main.o mapgen.o mersenne.o
g++ -onimrl -lncurses -lefence main.o mapgen.o mersenne.o
main.o: nimrl.cpp nimrl.h
g++ -c -ggdb -omain.o nimrl.cpp
magpgen.o: mapgen.cpp nimrl.h
g++ -c -ggdb -omapgen.o mapgen.cpp
mersenne.o: mersenne.cpp
g++ -c -ggdb -omersenne.o mersenne.cpp
clean:
rm -rf *.o nimrl
debugging
Occasionally, usually when I do a partial compile with make, gdb doesn't have symbol tables, and I get a memory address instaead of a line number. here is my makefile:
I noticed that if I do a make clean before make, it works correctly. but if I do that, I might as well be using a script!
Thanks in advance
[Edited by - NIm on July 25, 2005 8:23:50 PM]
g++ -onimrl -lncurses -lefence main.o mapgen.o mersenne.o
g++, version 3.3.5
[Edited by - NIm on July 26, 2005 9:31:58 PM]
g++ isn't a linker. g++ will call a linker when you ask it to link files like that. To find out what linker g++ is calling try using g++ -Xlinker --version
ld version 2.15. sorry.
something else I noticed was that as my code is now, it segfaults and there's no line number info, but make clean, make and it doesn't even segfault, but there is line number info.
[Edited by - NIm on July 26, 2005 10:52:31 PM]
something else I noticed was that as my code is now, it segfaults and there's no line number info, but make clean, make and it doesn't even segfault, but there is line number info.
[Edited by - NIm on July 26, 2005 10:52:31 PM]
Sounds like you've missed a dependency or so in the makefile. That's often the problem when you get different results from partial makes compared to complete makes.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement