Does CW support having more than 1 file with the same name?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does CW support having more than 1 file with the same name?

2,877 Views
GonzaloVictorio
Contributor I
I have my CodeWarrior project so that I have different targets and each target have some files that are named the same but there's one for each target. All those files are visible in the File List Tab of the project except two files: main.c and vector.c.
 
Is there a problem with this?
 
It only displays one main.c and one vector.c, but the compiler is trying to compile a different one than the specified for that target.
 
If I try o add it again to the project (as if it had been deleted from the project) it just displays this error message:
 
"At least one file could not be added to the selected target(s)."
 
Any idea of what's going on? Why are those not visible?
 
Thank you!
Labels (1)
0 Kudos
3 Replies

474 Views
weezer
Contributor I

For reference, I was able to include 2 files with the same name only if I created a new Group (right click-> create group)

and in theese new groups add the file. For instance: 

- "RAM" : file1.c

- "FLASH" : file1.c

If not creating 2 new groups the IDE complained about "Removed duplicated filename " or something similar.

0 Kudos

474 Views
J2MEJediMaster
Specialist I
I think CodeWarrior does support having files with the same name, but like humans, the IDE can get confused as to what files go where. Is you project organized so that the separate directories hold the similarly-named files? Have you happened to reset the project's entry paths (Project | Reset Project Entry Paths)? That may have confused the IDE.

---Tom
0 Kudos

474 Views
sevans73
Contributor I

I too am experimenting with a similar target issue. I have found that you need to be careful about the search path that is specified for each target. When you add a file to the project be sure it is only added to the correct target(s) and not to all targets, same with the search paths.

 

I have a project with two files of the same name, with one target referencing one file and a different target referencing the other file of the same name. The two files are in different directories of course. It does work, but the Project File window does not show the full path name so they both appear in the list with the same name.

 

The Project Inspector tool will show the full path name. My question is how to set the Project Files window to show the full path name or at least a relative path name instead of just the file name? Is there a preference setup to display path names?

0 Kudos