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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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
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
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