Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 1074 -
(4) The way to discriminate if using compiler is Watcom C is as follows.
The Watcom C compiler defines the macro " __WATCOMC__", in which the
version number of the Watcom C is set.(Ex. Ver.10.5 --> __WATCOMC__=1050 )
By referring this macro, it can be discriminated that if the Watcom C
compiler is in action and the version of the Watcom C compiler.
(Ex.) #if defined( __WATCOMC__ )
<< The coding for Watcom C. >>
#else
<< The coding for MS-C. >>
#endif
#if ( _MSC_VER >= 700 ) || defined( __WATCOMC__ )
<< Coding for MS-C Ver.7 (or upper) or Watcom C. >>
#endif
There are no other points than described above to consider for programming.
You may program as same as with MS-C. But C++ feature should not be used.
4.3 makefile
To compile with Watcom C, use "makefile.wat" instead of ordinary "makefile".
To make application, specify
wmake -f makefile.wat
on command line, or rename "makefile.wat" to "makefile" and specify
wmake
on the command line.
Change the block (A) through (H) described in the top section (task defining
block) of "makefile" according to your application.