[MSVC] OpenFrameworks failed to build error MSB3073: xcopy /Y /E "C:\gitP\openframeworks\openFrameworks\examples\templates\emptyExample\dll\x64\*.dll"
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:
- git -C "C:\gitP" clone --no-checkout https://github.com/openframeworks/openFrameworks openframeworks\openFrameworks
- git -C "C:\gitP\openframeworks\openFrameworks" checkout 7a09e9e
- git -C "C:\gitP\openframeworks\openFrameworks" submodule sync
- git -C "C:\gitP\openframeworks\openFrameworks" submodule foreach git reset --hard
- git -C "C:\gitP\openframeworks\openFrameworks" submodule foreach git clean -xdf
- git -C "C:\gitP\openframeworks\openFrameworks" submodule update --init --recursive
- 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
- cd /d C:\gitP\openframeworks\openFrameworks
- "C:\Program Files\Git\bin\sh.exe" ./scripts/vs/download_latest_libs.sh -p vs --silent
- set PG_OF_PATH=C:\gitP\openframeworks\openFrameworks
- cd /d C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\commandline
- devenv /upgrade commandLine.sln
- msbuild /m /p:Platform=x64 /p:Configuration=Release commandLine.sln
- copy C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\commandline\bin\commandLine.exe C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\frontend\app\projectGenerator.exe
- cd /d C:\gitP\openframeworks\openFrameworks
- C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\frontend\app\projectGenerator.exe ./examples/templates/emptyExample
- C:\gitP\openframeworks\openFrameworks\apps\projectGenerator\frontend\app\projectGenerator.exe ./examples/templates/allAddonsExample
- mkdir build_amd64 && cd build_amd64
- 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]
I would try to edit the file /scripts/templates/vs/emptyExample.vcxproj and just comment out the three xcopy lines there.
Any ideas here @danoli3 ?
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: @.***>
@dimitre I try to comment out the three xcopy lines on /scripts/templates/vs/emptyExample.vcxproj, this issue does not reproduce.
@danoli3 wishing you the best of health. take care
Seems like maybe project generator is out of date, need to update the hash
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