Question: My Qt project have two source files with the same name but in different folder.
The pro file is:

```
SOURCES = A/Test.cpp 
SOURCES += B/Test.cpp

```

It can generate Visual Studio solution file via Qt Visual Studio addon, but it won't work because the generated object file have the same name: Test.obj.
That will cause **LNK2001 unresolved external symbol** because one of Test.obj is overwritten.

How to write proper pro file to deal with that?

Answer: 
You should consider splitting your solution in multiple projects, but it depends if each one of those folders could represent a project by its own.
If you choose this solution, you will have to write one .pro file per project. The usual way to go is to write a 'generic' \*.pri file which is included from every \*.pro file:

folder1.pro

```
TEMPLATE=lib
TARGET=folder1
include( ../common.pri )

```

folder2.pro

```
TEMPLATE=lib
TARGET=folder2
include( ../common.pri )

```

common.pri (in parent directory)

```
SOURCES += *.cpp
HEADERS += *.h
# etc.

```

Obviously the contents of each pro file depends on your solution.

If you don't want to split the source files in multiple projects, the easier solution would be to rename one the conflicting files, I guess.
One solution is to rename the files:

```
A/a_Test.cpp 
B/b_Test.cpp

```

It's a bit ugly, but its simple and the class names can stay the same.