openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

[MSVC] OpenFrameworks failed to build error MSB3073: xcopy /Y /E "C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\dll\x64\*.dll"

Open Shinoyang opened this issue 1 year ago • 7 comments

OpenFrameworks failed to build with "error MSB3073:xcopy /Y /E "C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\dll\x64*.dll"" with MSVC on windows. It can reproduce on version https://github.com/openframeworks/openFrameworks/commit/7a09e9eee85b8b98f8447072d6259544a0b9cb37 on master branch. Could you please help look at this issue? Thank you very much. Repro steps:

  1. git -C "C:\gitP" clone --no-checkout https://github.com/openframeworks/openFrameworks openframeworks\openFrameworks
  2. git -C "C:\gitP\openframeworks\openFrameworks" checkout 7a09e9e
  3. git -C "C:\gitP\openframeworks\openFrameworks" submodule sync
  4. git -C "C:\gitP\openframeworks\openFrameworks" submodule foreach git reset --hard
  5. git -C "C:\gitP\openframeworks\openFrameworks" submodule foreach git clean -xdf
  6. git -C "C:\gitP\openframeworks\openFrameworks" submodule update --init --recursive
  7. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set CL= /Bcapture_repro C:\a_work_temp\rwc_project_logs\OpenFrameworks\preprocessed_repro_setup & set LINK= /onfailrepro:C:\a_work_temp\rwc_project_logs\OpenFrameworks\link_repro_setup
  8. cd /d C:\gitP\openframeworks\openFrameworks
  9. "C:\Program Files\Git\bin\sh.exe" ./scripts/vs/download_latest_libs.sh -p vs --silent
  10. set PG_OF_PATH=C:\gitP\openframeworks\openFrameworks
  11. cd /d C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\commandline
  12. devenv /upgrade commandLine.sln
  13. msbuild /m /p:Platform=x64 /p:Configuration=Release commandLine.sln
  14. copy C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\commandline\bin\commandLine.exe C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\frontend\app\projectGenerator.exe
  15. cd /d C:\gitP\openframeworks\openFrameworks
  16. C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\frontend\app\projectGenerator.exe ./examples/templates/emptyExample
  17. C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\frontend\app\projectGenerator.exe ./examples/templates/allAddonsExample
  18. mkdir build_amd64 && cd build_amd64
  19. msbuild /m /p:Platform=x64 /p:Configuration=Release ../examples/templates/emptyExample/emptyExample.vcxproj /t:Rebuild /p:PlatformToolset=v143

Error log: OpenFrameworks_build.log

Error info:

LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
         emptyExample.vcxproj -> C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\bin\emptyExample.exe
       PostBuildEvent:
         
                     xcopy /Y /E "C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\dll\x64\*.dll" "C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\bin\"
                 
         :VCEnd
         0 File(s) copied
         File not found - *.dll
     1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command " [C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\emptyExample.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073:             xcopy /Y /E "C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\dll\x64\*.dll" "C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\bin\" [C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\emptyExample.vcxproj]

Shinoyang avatar May 14 '24 09:05 Shinoyang

I would try to edit the file /scripts/templates/vs/emptyExample.vcxproj and just comment out the three xcopy lines there.

dimitre avatar May 14 '24 12:05 dimitre

Any ideas here @danoli3 ?

dimitre avatar May 14 '24 12:05 dimitre

I shall look into it!

Finally back from my health retreat

On Tue, 14 May 2024 at 10:47 PM, Dimitre @.***> wrote:

Any ideas here @danoli3 https://github.com/danoli3 ?

— Reply to this email directly, view it on GitHub https://github.com/openframeworks/openFrameworks/issues/7954#issuecomment-2110141351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGK2HF2BSJGI4C2ZZ4A75DZCIBXDAVCNFSM6AAAAABHV24KNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJQGE2DCMZVGE . You are receiving this because you were mentioned.Message ID: @.***>

danoli3 avatar May 14 '24 18:05 danoli3

@dimitre I try to comment out the three xcopy lines on /scripts/templates/vs/emptyExample.vcxproj, this issue does not reproduce.

Shinoyang avatar May 15 '24 02:05 Shinoyang

@danoli3 wishing you the best of health. take care

dimitre avatar May 15 '24 16:05 dimitre

Seems like maybe project generator is out of date, need to update the hash

danoli3 avatar May 16 '24 04:05 danoli3

Ah this occurs when multiple projects are open or file is locked basically.

Might be another solution in naming conventions for the multitargets will look into

danoli3 avatar May 20 '24 12:05 danoli3