Author Topic: Conditional compile greyed out  (Read 7866 times)

Sylvain

  • Community Member
  • Posts: 18
  • Hero Points: 1
Conditional compile greyed out
« on: November 08, 2010, 06:54:06 PM »
How do I define the symbol default value to have the code greyed out in the editor windows?

Working
Code: [Select]
#ifdef 0
  // The code is greyed out.
#endif

Cannot get to work
Code: [Select]
#ifdef __MY_SYMBOL__
  // How to get this code greyed out?
#endif

#if __MY_SYMBOL__ == 1
  // How to get this code greyed out?
#endif


Sylvain

  • Community Member
  • Posts: 18
  • Hero Points: 1
Re: Conditional compile greyed out
« Reply #1 on: November 08, 2010, 06:58:03 PM »
Just find the answer in this thread: http://community.slickedit.com/index.php?topic=5630.0

jechard

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Conditional compile greyed out
« Reply #2 on: November 19, 2010, 06:29:23 PM »
Beta version 3.6.0 does fix the problem referenced in the linked post.

To define the preprocessor names, go to the slickedit preferences / application languages / c++ and go to the C++ Preprocessor and define or undef the variable you want.

An important caveat is that these preferences are a slickedit setting, so these settings apply to all projects and workspaces.  If you cross compile with different definitions, you may need to undef some variables and redefine others.

<hint>I would love to see this migrated to a project level so I could have multiple projects in a workspace with different preprocessor definitions.</hint>