News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Added source files don't show under "src"

Started by nununo, June 02, 2008, 03:44:14 AM

Previous topic - Next topic

nununo

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

stahta01

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
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

nununo

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