Qt - Visual Studio - Work with projects on multiple computers

后端 未结 5 516
野趣味
野趣味 2021-01-22 12:36

I work with the same Visual Studio projects on multiple computers (work/home) using Dropbox to sync between the two. Because VS creates some extra large files, I used to remove

5条回答
  •  执笔经年
    2021-01-22 12:55

    In your case, you may delete files but not directories, i.e. GeneratedFiles\Debug and \Release should stay. If you look onto your h files, they do moc-ing and uic-ing as custom build step, and there is no path checking code in that events.

    "$(QTDIR)\bin\moc.exe"   -DQT_NO_QT_INCLUDE_WARN -DUNICODE -DWIN32 -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_NETWORK_LIB -DJSBRIDGEAPI_LIB -D_WINDLL  -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I".\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtWebKit\." ".\apisignalemitter.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_apisignalemitter.cpp"
    

    So - adding dirs .\GeneratedFiles\$(ConfigurationName)\ may solve your problem. Also, check if $(QTDIR) defined.

    UPD - make sure you have QT installed on both machines in some place

提交回复
热议问题