Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: nununo on June 02, 2008, 03:44:14 am
-
Hi,
This must be a very silly question but...
When I add files (.CPP or .H) to a project, instead of showing up under /src they show up under another folder hierarchy next to /src, even though the actual files are inside /src on my hard drive. This other folder is blue instead of green.
How can I make the new files appear under /src?
Thanks,
Nuno
-
With an project open try the various settings of
Project -> Project Tree
"Categorize by file types"
"Display Folders as On Disk"
I think you want "Display Folders as On Disk" checked; I have both of them checked.
Tim S
-
I found the solution.
Hum... actually I have that option checked. The problem was something else.
In the project file (.CBP) I can see the following:
<Unit filename="src\main.cpp">
<Option virtualFolder="src\" />
</Unit>
<Unit filename="src\testApp.cpp">
<Option virtualFolder="src\" />
</Unit>
<Unit filename="src\testApp.h">
<Option virtualFolder="src\" />
</Unit>
<Unit filename="src\testApp2.cpp" />
<Unit filename="src\testApp2.h" />
So, the already existing files have a virtualFolder defined while the ones I added manually don't.
As soon as I learned this, I realized that it was as simple as dragging the files from the blue folder to the green "virtual" folder.
Problem solved!
Thanks!
Nuno