如何生成包含运行时图标的 .res 文件
How to generate .res file containing icons runtime
我需要制作 res 运行时,它需要包含我的应用程序列表中的一些图标。
res 文件必须放在项目 "Resource File" 字段中。所以它需要与 win32 兼容。
我曾经尝试过:
- 创建一个包含图标的 .resx 文件运行时,我将其转换为
.resources 文件 ResGen.exe 但我陷入了死胡同。
- 我试图适应我在项目中创建的 .resx "Resource File" 但它
给出一个错误说 "the selected file is not a valid Win32 resource file".
- 我也尝试创建一个 .rc 文件,但我不知道如何正确使用
rc.exe 将其编译为 .res 文件,这样也会出现另一个死胡同...
你知道我怎样才能做到这一点吗?
如果我尝试编译 .rc 文件,我会得到以下输出:
Microsoft (R) Windows (R) Resource Compiler, Version 5.1.2264.1 - Build 2264
Copyright (C) Microsoft Corp. 1985-1998. All rights reserved.
Using codepage 1252 as default
Creating rc - ResourceFile.res
RC: RCPP -CP 1252 -f C:\Users\itis\Desktop\RCa18040 -g C:\Users\itis\Desktop\RDa18040 -DRC_INVOKED -D_WIN32 -pc\:/ -E -I C:\Users\itis\Desktop\ -I .
C:\Users\itis\Desktop\_mingw.h(51) : error RC2188: #error : ERROR: You must use a GNU Compiler.
C:\Users\itis\Desktop\_mingw.h(55) : error RC2188: #error : ERROR: You must use a GNU Compiler version >= 3.4.5.
C:\Users\itis\Desktop\afxres.h(34) : fatal error RC1015: cannot open include file 'windows.h'.
Premere un tasto per continuare . . .
我需要制作 res 运行时,它需要包含我的应用程序列表中的一些图标。 res 文件必须放在项目 "Resource File" 字段中。所以它需要与 win32 兼容。
我曾经尝试过:
- 创建一个包含图标的 .resx 文件运行时,我将其转换为 .resources 文件 ResGen.exe 但我陷入了死胡同。
- 我试图适应我在项目中创建的 .resx "Resource File" 但它 给出一个错误说 "the selected file is not a valid Win32 resource file".
- 我也尝试创建一个 .rc 文件,但我不知道如何正确使用 rc.exe 将其编译为 .res 文件,这样也会出现另一个死胡同...
你知道我怎样才能做到这一点吗?
如果我尝试编译 .rc 文件,我会得到以下输出:
Microsoft (R) Windows (R) Resource Compiler, Version 5.1.2264.1 - Build 2264
Copyright (C) Microsoft Corp. 1985-1998. All rights reserved.
Using codepage 1252 as default
Creating rc - ResourceFile.res
RC: RCPP -CP 1252 -f C:\Users\itis\Desktop\RCa18040 -g C:\Users\itis\Desktop\RDa18040 -DRC_INVOKED -D_WIN32 -pc\:/ -E -I C:\Users\itis\Desktop\ -I .
C:\Users\itis\Desktop\_mingw.h(51) : error RC2188: #error : ERROR: You must use a GNU Compiler.
C:\Users\itis\Desktop\_mingw.h(55) : error RC2188: #error : ERROR: You must use a GNU Compiler version >= 3.4.5.
C:\Users\itis\Desktop\afxres.h(34) : fatal error RC1015: cannot open include file 'windows.h'.
Premere un tasto per continuare . . .