User forums > Help

Source subdirectory

(1/2) > >>

Jasper:
Hi all,

I want to move all my source files from the project's location to a subdirectory (I don't want it in the same directory as .cpb, I don't want it in the same directory as bin, or anything else). How can I do this?

Jenna:
Remove thge files from project,
move them in a file explorer,
readd them to your project.

Jasper:
I can see that bit, but it will make my files appear in the project, but it won't make them work.

For example, this does not make includes work, as the path has changed. Now, I know that you can add the directory to the directory in which a include works, but if at all possible I would like to make the new dir my "root" directory as far as the source files are considered (for example, I also would like to get rid of the completely useless "source" folder in my project view, which is shown when using your way.

I can understand if it not possible to do what I want (though personally I would think that is shortcoming of Code::Blocks).

Jenna:
If your includes do not work anymore you have to fix the compilers search-directories, if you don't like the projects tree-structure, you can create virtual folders and drag the files you want into them.

Jasper:
Yes, that's what I was saying, I know that you can emulate some of the results I am looking for, but that's not what I want. You can change a lot of things for it to work almost the same, but you really can't achieve the same results as when the project file is in the very same directory as the source files are.

Also, I would like to say I consider your point about virtual directories to be rather nonsensical. So yes, I can drag every file to be displayed from what it would normally be. But I don't want to have to drag all my files. I just want a tree that isn't like this:

Sources
-source
--somefile.cpp
--anotherfile.cpp
Headers
-source
--somefile.h
--anotherfile.h

but like this:

Sources
-somefile.cpp
-anotherfile.cpp
Headers
-somefile.h
-anotherfile.h

Navigation

[0] Message Index

[#] Next page

Go to full version