May 22, 2023
On Friday, 19 May 2023 at 21:19:07 UTC, Richard (Rikki) Andrew Cattermole wrote:
>
> On 19/05/2023 9:39 PM, John Xu wrote:
>> On Thursday, 18 May 2023 at 15:39:05 UTC, Richard (Rikki) Andrew Cattermole wrote:
>>>
>>> On 19/05/2023 2:19 AM, John Xu wrote:
>>>> On Monday, 15 May 2023 at 03:54:03 UTC, Richard (Rikki) Andrew Cattermole wrote:
>>>>> That is only for OMF target.
>>>>>
>>>>> You need rc that comes with Visual Studio C++ build tools.
>>>>>
>>>>> Alternatively windres from mingw may work (I haven't tested).
>>>>
>>>> How can I add this step to dub.sdl ?
>>>
>>> You would use one of the build commands and then put the result file name into source files.
>>>
>>> However you may not want to require it in normal builds (since the file it outputs won't change you can just commit that) just to ensure your build is reproducible.
>> 
>> sourceFiles ?
>> or
>> libFiles ?
> sourceFiles.
>
> libFiles is for shared libraries.

When I put resource.rc in sourceFiles, dub said, "Error: unrecognized file extension rc";
When I put resource.res in sourceFiles, dub said,"resource.res : fatal error LNK1136: Invalid or damaged file.  Error: linker exited with status 1136"
May 22, 2023
On 22/05/2023 11:18 PM, John Xu wrote:
> When I put resource.rc in sourceFiles, dub said, "Error: unrecognized file extension rc"; When I put resource.res in sourceFiles, dub said,"resource.res : fatal error LNK1136: Invalid or damaged file. Error: linker exited with status 1136"

Yes, .res is the correct file extension, that is the output of the rc compiler.

That linker error would suggest that you need to use Microsoft's tool to compile the resource.rc file.

https://learn.microsoft.com/en-us/windows/win32/menurc/using-rc-the-rc-command-line-
1 2
Next ›   Last »