Qt4 in Visual Studio 2008 - moc-ed files get excluded from build?

后端 未结 6 1594
野趣味
野趣味 2021-01-01 01:26

Recently I have installed VS Addin from Qt Software and I imported my .pro project to VS2008. Generally, all works fine, with one small but annoying exception.

Suppo

6条回答
  •  梦谈多话
    2021-01-01 01:50

    Problem solved. I found out that in my hand-crafted .pro file describing my project, I had MOC_DIR specified as:

    MOC_DIR = .moc

    After importing to Visual Studio directory for "Generated files" was the same for both Release and Debug. So, when my active configuration was Debug for example, when I saved a file it became excluded from build because it was sensible for Release-related file - just as rpg and Andrew suggested. After changing the directory to .moc\$(ConfigurationName) the problem is no longer seen (and I see 2 versions of each generated file in my solution - one for each configuration).

    Thank you for your help everyone!

提交回复
热议问题