Janus wrote:
> i did that yesterday and it didn't work. now things have changed a bit. 
> it works but i don't know why. i have moved some declarations and 
> includes in the meantime (basically i cleaned up a bit) but i can't see 
> how this effected this issue.

        Doing a 'make clean;make' causing things to work is likely
        due to changes being made to your apps own #include files,
        like the redefinition of classes or structures.

        When you change the definition of classes/structs,
        all code using them has to be rebuilt. If you don't,
        prebuild modules (.o's) still assuming classes/structs
        are of the old size and arrangement will crash or go wild
        when the rebuilt main() version passes pointers to classes/structs
        with the new size down to the old un-rebuilt modules.

        Rebuilding all the code makes sure all the modules agree
        on class/struct sizes, and is probably why your code suddenly
        works when you make clean;make.

        A common similar thing is having a hard bug that you can't figure
        out, then adding a printf() during debugging makes it work, then
        you take the printf away and it still works.

        All basically the same issue; a problem in the makefile's dependencies.
        If the makefile checks .H file date stamps against /all/ code that uses
        them, then this won't happen. But that would involve using makedepend
        (or whatever it is) which most folks don't use (myself included), so
        I just know to do a 'make clean; make' whenever I diddle around with .H 
files..
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to