Find the answer to your Linux question:
Results 1 to 2 of 2
Dear all, This is my first thread I have created some C++ classes. In order to compiling these classes, I use a Makefile. In the Makefile there is the following ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    1

    compiling with debug options

    Dear all,
    This is my first thread

    I have created some C++ classes.
    In order to compiling these classes, I use a Makefile.
    In the Makefile there is the following line:
    CFLAGS=-O2 -DNDEBUG=1 -DWITH_PARSIM -DWITH_NETBUILDER
    The option -DNDEBUG=1 disables the debug mode, so that the lines beetween #ifdef DEBUG and #endif statements are not compiled.

    If I want to compile these classes in debug mode, I could modify the Makefile by replacing -DNDEBUG=1 with -DDEBUG.

    Is it possible compiling these classes in debug mode without modifying the Makefile?

    Thanks a lot!

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Sure.
    Code:
    make "CFLAGS=-O2 -DDEBUG -DWITHPARSIM -DWITH_NETBUILDER"
    or, if you're specifying a particular target,
    Code:
    make yourfavoritetarget "CFLAGS=-O2 -DDEBUG -DWITHPARSIM -DWITH_NETBUILDER"
    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...