Compilation error, Cannot open cmake_pch.pch

35 Views Asked by At

I am getting the following 3 errors in visual studio code when trying to build. using x64 native tools.

error is...

Error   LNK1181 cannot open input file '..\scripts\RelWithDebInfo\scripts.lib'  worldserver G:\Build\src\server\apps\LINK   1       
    

see screen shot for all 3.

error messages

cmake ran perfectly fine, tried running all as administrator.

EDIT: fixed the first error by changing build path however I am still getting no 'scripts.lib' file, the file doesn't exist and the scripts section in Cmake is set to 'static', no errors on Cmake

1

There are 1 best solutions below

1
Rory On

Finally got it working, I had to build the full project, then clean the 'scripts' project, then open resource monitor to find all the cl.exe handles that was holding open the cmake_pch.pch file open, delete all those. then build the scripts project alone, then build the rest again (NOT rebuild).

it seems like the issue was either visual studio or one of the other projects itself not letting go of the handle for the .pch for the scripts project to then read and use it.. really no clue why though.