News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to include a .rc file inside another .rc file?

Started by Sergiu FUNIERU, February 18, 2010, 10:36:53 PM

Previous topic - Next topic

Sergiu FUNIERU

I like to split my asm files. For instance, each action has a separate file.

I tried to split a .rc file into 2 separate files, but I wasn't able to compile the separate files.

What can I do?

For instance, index.rc is made of menu_1.rc and menu_2.rc
I want to do something like:
include menu_1.rc
include menu_2.rc
which works fine for .asm files, but it didn't work for .rc files.

hutch--


Sergiu,

A resource script file .RC must be compiled seperately from the asm code. Its done with RC.EXE and the RES or converted res to OBJ file is then linked into the EXE file. You can split up an RC file but you use C notation inside them.

You can costruct an RC file so the main one calls any other you want to add to it using the following notation.

    #include "yourfile.ext"

Something to watch out for, inside quotes when you write a file path you have to be aware of C escapes so sometimes when you have a path inside quoted text you have to add the escape yourself.

"files\\image.bmp"
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php