Modifying Include and Define in GCC on Windows Platform

Modifying Include and Define in GCC on Windows Platform Figure 1Path:source\gcc-4.1.1\libcpp open filedirectives.c, as shown in Figure 1.

  1. Change define to dingyi;a. Add the following at the bottom of #define DIRECTIVE_TABLE in directives.c:

    D(dingyi, T_DINGYI, KANDR, IN_I)/* */, as shown in Figure 1.

    b. Then search for do_define in directives.c:

    Modifying Include and Define in GCC on Windows Platform

    Figure 2

    Then add a new function do_dingyi below this function, as shown in Figure 2.

  2. Change include to baohan;a. Add the following at the bottom of #define DIRECTIVE_TABLE in directives.c:

    D(baohan, T_DINGYI, KANDR, IN_I)/* */, as shown in Figure 1.

    b. Then search for do_include in directives.c:Modifying Include and Define in GCC on Windows Platform Figure 3Then add do_baohan below this function, as shown in Figure 3.

  3. Compile and install Enter the command make CFLAGS=-O2 LDFLAGS=-s to compile and use make install to install;
  4. TestModifying Include and Define in GCC on Windows PlatformModifying Include and Define in GCC on Windows PlatformThus, the modifications of define to dingyi and include to baohan are complete!

Leave a Comment