Bug with JUCE 6?

Hi there! I am learning about JUCE, and are now following the “Graphic” tutorial here on the website. One thing that keep coming up after I have, for example, only commented out 1 line of code and un-commented it, this error message keep coming up:

LNK1168 cannot open C:\Users\Simen\Documents\Visual Studio 2019\Juce Projects\Gui1\Builds\VisualStudio2019\x64\Debug\App\Gui1.exe for writing

Is the program still running when you try and build it? The executable can’t be written to if the OS has it open for running. Otherwise there isn’t anything obvious.

1 Like

In addition to what @cpr2323 said, it could be an anti-virus that interferes: as soon as it sees a .exe appearing on disk, it may start scanning it in a way that prevents the compiler from writing to it.

If you have an anti-virus program on your computer, try disabling it and see if the problem goes away.
If it does, I hope it allows you to exclude certain folders from the scan, so that you can exclude that specific folder and re-enable the antivirus

Hi, I think this was the problem. I found another post yesterday that had the same error code, but in a different way. Tried to close JUCE and Visual Studio and re-open the project again. After that I build the solution again, and the problem was gone.

Thanks you anyway for helping! :slightly_smiling_face:

That might be the problem to, but I managed to fix it yesterday by closing all JUCE Visual studio windows in the task manager. Then I reopened the project from the Projucer and built the solution again, and the error was gone. Thank you anyway! :slightly_smiling_face: