Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compile .rc files when building with CL.exe?

I'm running cl for my build phase. How do I compile embedded resources into the final executable?

like image 594
Stuart P. Bentley Avatar asked Jan 15 '11 11:01

Stuart P. Bentley


1 Answers

Run rc.exe to compile the .rc script into a .res. Pass that to the linker to get it embedded in the final image.

There are preciously few reasons to not just let the IDE take care of this btw. It does a lot of other stuff automagically. Like getting the proper manifest embedded. And creating a debug build that helps you diagnose uninitialized variables and stack corruption. And supporting edit + continue. But yes, you can do this too if you know all the command line switches. Best way to find them is to build some sample projects with the IDE and look at the build log files to see what's being used.

like image 84
Hans Passant Avatar answered Oct 06 '22 18:10

Hans Passant