linter-gcc interferes with compilation using make
Scenario: Edit a .c file in atom and then save it. Switch to a terminal and run 'make'. The .o file is not recompiled but any targets that depend on the .o file are recompiled.
Took me a while to figure it out but apparently linter-gcc creates a new .o file every time it lints (in my case every time the file is saved). This means that when 'make' is run the .o file is already newer than the .c file and so is not recompiled. But the .o file the linter creates is missing certain definitions and so the targets that depend upon that .o file fail to compile.
Solution: Have the linter 'touch' the .c file after it has modified the .o file. With an updated timestamp that is newer than the .o file 'make' will know to recompile the .c file. Better yet the linter should create separate files for its task and shouldn't be modifying the .o file. An editor shouldn't be modifying a projects .o files.
What are the options you are passing to gcc through gcc-linter? I cannot reproduce this issue.
I am not passing any options from gcc-linter to gcc. I am simply using gcc-linter in atom and then I use make from the terminal to compile the project. Since gcc-linter updates the timestamp of the .o file AFTER I have saved the .c file this messes up the dependency analysis for make. make thinks that the .o file is up to date since its timestamp is after that of the .c file and so doesn't recreate it as it should.