Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - #pragma deflib default library inclusion control http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 #pragma DEFLIB      Default library inclusion control
------------------------------------------------------------------------------
 Syntax
   #pragma DEFLIB+|-

 Arguments
   + and - control if the option is on or off, respectively.

 Description
   The #pragma DEFLIB directive controls the automatic inclusion of
   the standard Force libraries in the link process.

   By default, the compiler places a reference to the standard
   libraries in the object module that causes the linker to
   automatically search those libraries for resolving external symbols
   referenced in the code. This mechanism allows for the omission of
   specifying the respective libraries for the linker.

   The default behavior can be overridden by the #pragma DEFLIB-
   directive. In this case the standard libraries are not searched
   automatically, which might be desired when writing alternative library
   functions.

   The #pragma DEFLIB+ directive can be used to override the effect of the
   -Zl compiler switch.

 Example
   #define EXAMPLE_DIRECTIV
   #include example.hdr

   /*
   Use a constant to control the generation of default library information
   
   To create modules for a non-PC environment, call the compiler using the
   following syntax:
   
   force.exe -DACME_COMP test.prg
   */
   
   #ifdef ACME_COMP
      #pragma DEFLIB-             // do not include force.lib in the default
                                  // library record
      #pragma INCLUDELIB forceac  // use another runtime library instead of
                                  // force.lib
      #pragma INCLUDELIB acmefunc // add acmefunc.lib to the default library
                                  // list
   #endif
   
   proc Test_858
   ? "Hello world"
   endproc

   proc main
   Test_858()
   endproc

See Also: #pragma INCLUDELIB -Zl

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson