Thread: #define from the command line

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    32

    #define from the command line

    Can #define and #undef flags be used from the Borland compiler command line?

    Seron

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    At compile time, yes, using "-Dmacroname" where 'macroname' is the name of what you want to define. From the command line:

    "myprog myarg myarg myarg"

    No.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User Engineer's Avatar
    Join Date
    Oct 2001
    Posts
    125
    You can define anything you want on the borland bcc32 compiler command line using the -D flag.

    Example:

    Source:

    #ifdef __DEBUG__
    // some code
    #endif

    You can compile it using -D__DEBUG__ to compile the conditionally defined code.
    1 rule of the Samurai Code: if you have nothing to say, don't say anything at all!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer within a Struct
    By Bladactania in forum C Programming
    Replies: 11
    Last Post: 04-03-2009, 10:20 PM
  2. Why?!?
    By p3rry in forum C Programming
    Replies: 3
    Last Post: 01-08-2009, 12:52 PM
  3. size of an integer pointer
    By onebrother in forum C Programming
    Replies: 5
    Last Post: 07-09-2008, 11:49 AM
  4. edit controls in dialogs
    By Homunculus in forum Windows Programming
    Replies: 10
    Last Post: 02-23-2006, 03:38 PM
  5. Please STICKY this- vital to MSVC 6 dev - BASETSD.h
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 03-15-2005, 09:22 AM