QT中的 VS2008 的 .sln,.vcproj, *.proj.user

本文讨论了在移动QT项目过程中遇到的文件路径配置问题。解释了vcproj和sln文件的作用,并提供了调整路径配置的方法以确保项目在移动文件后能够正常编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

vcproj是工程文件,sln是解决方案文件。 

一个解决方案里面可以包含多个工程。


If that is a user specific setting you should consider storing that in the *.proj.user filename. If that setting is shareable between all users working on the project you should consider storing it in the project file itself(.如果这就是用户特定设置您应该考虑将存储在该 * proj.user 文件。如果该设置为可执行该项目的所有用户之间共享应考虑将它存储在项目文件本身中。)


发现移动QT的文件后,只改变了File的路径,却没有改变相应编译的路径。所以每次移动文件后,都编译不成功。


    <File
                RelativePath=".\Widget\qttestdlg.h"
                >
                <FileConfiguration
                    Name="Release|Win32"
                    >
                    <Tool
                        Name="VCCustomBuildTool"
                        Description="Moc'ing $(InputFileName)..."
                        CommandLine=""$(QTDIR)\bin\moc.exe"  "$(InputPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp" "-fStdAfx.h" "-f..\..\qttestdlg.h" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\qtmain" "-I." "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DUNICODE -DWIN32
"
                        AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
                        Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
                    />
                </FileConfiguration>
                <FileConfiguration
                    Name="Debug|Win32"
                    >
                    <Tool
                        Name="VCCustomBuildTool"
                        Description="Moc'ing $(InputFileName)..."
                        CommandLine=""$(QTDIR)\bin\moc.exe"  "$(InputPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp" "-fStdAfx.h" "-f..\..\qttestdlg.h" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\qtmain" "-I." "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." -DQT_CORE_LIB -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DUNICODE -DWIN32
"
                        AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
                        Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
                    />
                </FileConfiguration>
            </File>



改成一样即可.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值