Function embed_resource::compile[][src]

pub fn compile<T: AsRef<Path>>(resource_file: T)

Compile the Windows resource file and update the cargo search path if we’re on Windows.

On non-Windows non-Windows-cross-compile-target this does nothing, on non-MSVC Windows and Windows cross-compile targets, this chains windres with ar, but on MSVC Windows, this will try its hardest to find RC.EXE in Windows Kits and/or SDK directories, falling back to Jon Blow’s VS discovery script, and on Windows 10 %INCLUDE% will be updated to help RC.EXE find windows.h and friends.

$OUT_DIR is added to the include search path.

Examples

In your build script, assuming the crate’s name is “checksums”:

extern crate embed_resource;

fn main() {
    // Compile and link checksums.rc
    embed_resource::compile("checksums.rc");
}