I have 2 classes with the same name but in different namespaces. I can't change the naming of these classes or files. The problem is, qmake generates a Makefile with folder information dropped. So it creates OBJECTS targets with flat file names.
Makefile generated by qmake:
SOURCES = ../quml/src/lang/Type_.cpp \
...
../quml/src/uml/Type_.cpp \
...
OBJECTS = Type_.o \
...
Type_.o \
...
As you can see, there are 2 .cpp files in very different folders. This is supposed to link both objects files later into one executable. It does try so, but taking twice the same file, producing duplicate symbols and lacking the others, because the Type_.o is created from only one of the .cpp files (last one wins). This basically means I can never have 2 source files with same name in different folders applied to the same target.
Anybody any idea how I can solve this? Would any pro/pri tricks or subdir'ing help here?
The best of solutions I've found for this issue is try to create .pro (or simple Makefile) files for each folder and compile them as static libraries, or simply change their names.