以下是我的xyz.rc文件。
#include "winres.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION FILE_VERSION
PRODUCTVERSION PRODUCT_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "FileDescription", xyz.exe " " 1.1.1
VALUE "FileVersion", 1.1.1
VALUE "InternalName", "xyz.exe"
VALUE "CompanyName", ABC Company
VALUE "LegalCopyright", @2019(ABC Company)
VALUE "OriginalFilename", "xyz.exe"
VALUE "ProductName", xyz
VALUE "ProductVersion", 1.1.1
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
以下是我的cmake命令,用于在Windows中生成.syso文件。
execute_process(COMMAND cmake -E env CGO_LDFLAGS="" windres -i ${CMAKE_SOURCE_DIR}/xyz.rc -v -O coff ${CMAKE_SOURCE_DIR}/versioninfo_windows.syso)
当我生成.syso文件时,我得到'winres.h No such file or directory error'
。如何解决这个错误?我需要提供哪些环境路径?