Last active
July 23, 2021 22:49
-
-
Save SolomonSklash/e267247e0006ebce999ea2c8a347bbb1 to your computer and use it in GitHub Desktop.
Creating a COFF object file from a resource script file on WIndows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: This batch script should be run from a VS developer prompt. | |
:: rc will create a binary .res file | |
rc Resource.rc | |
:: cvtres will convert the .res file to a COFF object file | |
cvtres /MACHINE:x64 /OUT:Resource.o Resource.res | |
:: The object file can be included during compilation like so: | |
:: cl.exe main.cpp /link /OUT:main.exe /SUBSYSTEM:CONSOLE /MACHINE:x64 Resource.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment