I use dev-cpp 4.9.9.2 for a large project in c. when i press "compile", it compiles ALL source files even though i haven't edited them. this is very frustrating because it makes the program take very long to compile. how do i fix this?
I use dev-cpp 4.9.9.2 for a large project in c. when i press "compile", it compiles ALL source files even though i haven't edited them. this is very frustrating because it makes the program take very long to compile. how do i fix this?
Are all things in the same project? Incase, that's why.
How many C files have you got in the project. If there are many files then obvisoly it would take a longer time to compile. But you wouldn't notice the delay that much when u compile it second time.
I suspect you are using project file to create small programs. If you are just using some small programs where you dont need any other supposting or external c programs to be included in your program. Then it would be better that if you could use just one single file as a standalone file with no any other file. You could do this by clicking on
new -> Source file. Or just say Clt+N
So when ever you compile, you just compile one single file. That would be faster compare to project.
ssharish2005
Last edited by ssharish2005; 01-20-2007 at 05:17 AM.
Yeah, i were going to say that to
when i've used dev-cpp in previous projects, this was the case. it would take a long time to compile the 1st time (or if i pressed "rebuild all", but the 2nd time it would only compile the files i edited. but now, "compile" does the same thing as "rebuild all". that makes no sense, why compile source files again when they have already been built?Originally Posted by ssharish2005
perhaps it has something to do with the fact that the source files are in a different folder than the .dev file?
my dir structure is "Main Folder (.dev, makefile, resources, ect)" / "source (.c, .h, .o files)"
ssharish2005: i'm not sure i understand what you are talking about. i am building 1 executable. i do not want to have everything in one source file, because it would be hard to find certain code, and it would take longer to compile. i thought that having many different files in a project would speed up compile times, because the .o files that are up to date do not need to be recompiled. 18 source files btw. not that large, but large enough to make it annoying to recompile everything every time.
thank you for your replies.
I found that Dev-C++ did that all the time to me, although I was using an older version of Dev-C++.
I think it can be fixed by using the option "Generate Makefile", then editing the makefile so it's reasonable. If you don't edit it it only has one compiling rule which compiles everything, which may be the source of your problem now that I think about it.
You do know how to write a Makefile, right? The basic form is like this.
Of course, you get get more complicated ones than that. If you're interested, check out some make tutorials -- that's how I learned how to write them.Code:main.o: main.c gcc -c main.o # Note: the indentation must be with one tab, not spaces or anything. program.exe: main.o gcc main.o -o program.exe
Other than that, check your clock. If you've set it back recently it could mess things up.
Try re-creating the project.
Last edited by dwks; 01-20-2007 at 05:35 PM.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.