Book a Demo

Author Topic: Dealing with conditional compilation  (Read 2757 times)

dang

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Dealing with conditional compilation
« on: February 11, 2004, 10:29:34 am »
Is there an easy way to define pre-processor macros for importing code? I'm working with legacy code that supports both C and C++ class declarations and EA is picking up the C decls only. E.g.,

#ifdef CINTERFACE
struct ...
#endif
ifndef CINTERFACE
class ...
#endif

It appears that EA ignores the ifdefs because undefing CINTERFACE didn't work. Removing the entire block from the source allowed EA to import the C++ decl.

Thanks,
Dan

benc

  • EA Administrator
  • EA User
  • *****
  • Posts: 200
  • Karma: +0/-0
    • View Profile
Re: Dealing with conditional compilation
« Reply #1 on: February 11, 2004, 03:37:58 pm »
Hi Dan,

Unfortunately there is no way to force EA to evaluate the preprocessor directives during import. EA's existing macro definitition feature only allows you to specify which macros should be ignored, not evaluated.

Regards,
Ben