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: 
### Before Qt 5

You can try adding that line to your .pro file:

```
CONFIG += object_with_source

```

But as the option name implies, the .obj files will not be created in the out-of-source / "shadow build" directory.

### Qt 5 and older

That option has been replaced by [`object_parallel_to_source`](http://code.qt.io/cgit/qt/qtbase.git/commit/?id=47df12225918ba82abe35921af19e547717da58b) in Qt 5, which should work with the shadow building.
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.