News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Project file hierarchy messing with project compilation

Started by aluthren, December 19, 2012, 12:04:16 PM

Previous topic - Next topic

aluthren

So I'm trying to build a project I've been working on, but it seems that the order in which the files are compiled coincides with the file hierarchy in the project management tab. Two files in particular are the main.cpp file and fireworks_class.cpp. Since the files in the management tab are organized alphabetically my project is compiling the fireworks_class.cpp before main.cpp. My question is how can I customize/modify the file hierarchy in the management tab or how to "unlink" the compiling process from the management hierarchy. Or is there something else going on here that I'm not aware of? ???

P.S. I'm using codeblocks 10.05. I know it's an older version, but I only caught wind of codeblocks 12.11 today. I'll install it now, but I highly doubt that will fix my problem. I'll post a reply in a few minutes saying whether or not the new version fixed my issue.

oBFusCATed

Quote from: aluthren on December 19, 2012, 12:04:16 PM
Or is there something else going on here that I'm not aware of? ???
The real question is why do you care for the order?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

aluthren

Well, as I said before, the order in which the compiler compiles my files seems to be related to the order/hierarchy of the files in the management panel. Therefore I must come to the conclusion that the two are somehow connected. re-read the OP for all the details.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

aluthren

If main isn't the first to compile then the project gets errors, therefore I can't run my program. If you have useful information I would really appreciate if you could just post it. Thanks.

dmoore

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

aluthren

#6
The only errors I'm getting come from the fact that main.cpp isn't being compiled first. I'll look at it again.

dmoore

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

Alpha

If you right-click on a file, you can change its compile weight under the properties to force it to compile sooner/later.  (Files of the same weight are compiled alphabetically.)
However, as others have already mentioned, the problem is most likely from something else (compile order rarely matters within a target).