我需要使 res 运行时,它需要包含我在我的应用程序列表中的一些图标。res 文件必须放在项目的“资源文件”字段中。所以它需要与win32兼容。
我很想:
- 创建一个包含图标的 .resx 文件运行时,我使用 ResGen.exe 将其转换为 .resources 文件,但我最终陷入了死胡同。
- 我试图适应我在项目“资源文件”中创建的 .resx,但它给出了一个错误,提示“所选文件不是有效的 Win32 资源文件”。
- 我也尝试创建一个 .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 . . .