2 out of 3 work for me; without modification using CB SVN 7965 self-built.
Yes, this is how it should be, 2 of 3, exactly.
You might want to post more info; note, naming the projects with different title might also help.
These are not actually my projects, the first of them is supplied by the bug reporter, and two consequent are my modifications to the first one. I've made them very quickly and didn't try to make them look any nicer than they were in the first place.
Got the last one to build after I renamed the file containing the function level2 to level2.cpp
And this is exactly what you shouldn't do. The project has to compile without making any changes to it. The GNU toolchain itself is perfectly happy with having two different "level1.o" objects to link when they are in different locations, but of course it won't work if both of them have same name AND location. The C::B build system fails here when it gives the same location of object files to sources with different initial locations. In a big project with 3rd party libraries [located outside project tree] this situation may happen purely accidentally and the project won't be built while it should.
-------------- Build: Debug in level2 (compiler: GNU GCC Compiler Dwarf 2)---------------
g++.exe -Wmissing-include-dirs -Wextra -Wall -g -c C:\Users\stahta01\Downloads\relpath_tests\relpath_tests\dummy-2\level1\level2\main.cpp -o obj\Debug\main.o
g++.exe -Wmissing-include-dirs -Wextra -Wall -g -c C:\Users\stahta01\Downloads\relpath_tests\relpath_tests\dummy-2\root.cpp -o obj\Debug\root.o
g++.exe -Wmissing-include-dirs -Wextra -Wall -g -c C:\Users\stahta01\Downloads\relpath_tests\relpath_tests\dummy-2\level1\level1.cpp -o obj\Debug\level1.o
g++.exe -Wmissing-include-dirs -Wextra -Wall -g -c C:\Users\stahta01\Downloads\relpath_tests\relpath_tests\dummy-2\level1\level2\level2.cpp -o obj\Debug\level2.o
g++.exe -o bin\Debug\level2.exe obj\Debug\main.o obj\Debug\root.o obj\Debug\level1.o obj\Debug\level2.o
Output size is 36.34 KB
Tim S.
This log clearly displays the flaw, just don't do that renaming.