Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 923 -
#ifdef ONO8D
int cnc_upstart( long ) ;
#else
int cnc_upstart( int ) ;
#endif
So, define "ONO8D" when you compile O8-digit application. To define the
constant "ONO8D", following methods are also available other than defining by
"#define" statement in source or header files of each application.
(1) Modify the macro to invoke the compiler in makefile
Change definition of the "CC" macro in the makefile which invokes the C
compiler.
CC = CL /c /AL /FPi87 /Gs /G2 /Zl /D FS16 /I $(FCINC) $(CCOPT)
|
v
CC = CL /c /AL /FPi87 /Gs /G2 /Zl /D FS16 /D ONO8D /I $(FCINC) $(CCOPT)
~~~~~~~~
added
With this change, the C compiler automatically defines the constant "ONO8D"
when it is invoked.
(2) Define "/D ONO8D" by the environment variable CCOPT
Compile option can be defined by the environment variable CCOPT.
Defining as
SET CCOPT=/D ONO8D
has the same effect as specifying "/D ONO8D" on the command line which invokes
the compiler. By utilizing this function, compilation of the O8-digit
application and O4-digit application can be switched in accordance with the
definition of the environment variable CCOPT.
5.7.4 Changes in application program
Following changes are necessary to make existing application capable of
handling 8 digits program number.
(1) Change the type of the argument, which specifies program number, from
"int" to "long".
(2) Change the type of every variable, relating to (1) above, from "int" to
"long".
(3) Allocate sufficient area for displaying 8 digits, when showing program
number on the screen.
(4) Define the constant "ONO8D" in every source module.
(Define in common header file or in makefile.)