Skip to content

Instantly share code, notes, and snippets.

Last active July 23, 2021 22:49
What would you like to do?
Creating a COFF object file from a resource script file on WIndows.
@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