VisualStudio project with multiple sourcefiles of the same name?

前端 未结 3 969
执念已碎
执念已碎 2020-12-09 06:08

i have a largish C++ project, with source-files organised in multiple folders (on the filesystem).

in two of these folders, i have files with the same name. e.g.

3条回答
  •  再見小時候
    2020-12-09 06:31

    Maybe you can set the project wide 'object file name' (Configurtion Properties->C/C++->Output Files) to

    $(IntDir)%(RelativeDir)
    

    which uses the relative source folder of the source files. Note the %, but this gets ugly if your source files are located out of your project directory, containing ..\

提交回复
热议问题