Menu

compiling C not working

2007-08-02
2012-09-26
  • Nobody/Anonymous

    I can compile C++ well
    but when I change it into a source file for C, it doesn't work. The program does not compile at all. After i press the compile button, it says it's done right away, and when I run it, it says I haven't compiled yet..
    any help?

     
    • Wayne Keen

      Wayne Keen - 2007-08-03

      Please post your Basic 3, and tell us exactly how you are doing things like "change it to a source file for C"

      The Basic 3 are covered in the thread titled "Please Read Before Posting a Question"

      Wayne

       
    • Anonymous

      Anonymous - 2007-08-03

      A source xxx.cpp compiles to xxx.o, a source xxx.c also compiles to xxx.o, moreover changing the file name does not modify the time-stamp. So when make checks to see if xxx.o is upto date it sees that it is, so does nothing.

      The solution is simply initially to do a Project->Rebuild All, which deletes the object files first to force re-compilation.

      If that does not work or you get new problems do post the compile log.

      Clifford

       
      • Wayne Keen

        Wayne Keen - 2007-08-03

        Since the majority of what I write on a dialy basis doesn't take long to compile,
        (how long does it take to compile 10 SLOC, right Clifford? ;), I always do "Rebuild All",
        and I never do "Compile and Run", as it makes it certain that there's an error in my code.

        It's a carry over from the command line, where I do a "make clean/make" dance every time.

        Wayne

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.