Book a Demo

Author Topic: Problem with code synchronization and C defines  (Read 2765 times)

AndiA

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Problem with code synchronization and C defines
« on: October 23, 2007, 12:10:28 am »
Hi,
we are using C code in Enterprise Architect (7.0.817 Professional) with code synchronization.
When I have a class containig a define with typecast e.g. #define PI (float)3.14
in the Attributes list and start the code synchronization, Enterprise Archtiect complains
the define as code feature not in model.
When I press ignore then the define is placed in the code again,
so i have a new define on every synchronization.
Is there a better solution than placing it in the Operations list or ignoring it via "Settings->Preprocessor Macros"?


gpc

  • EA User
  • **
  • Posts: 111
  • Karma: +0/-0
    • View Profile
Re: Problem with code synchronization and C define
« Reply #1 on: October 24, 2007, 01:21:25 am »
Couldn't something static like that, that isn't affecting the design, be placed in a separate header file and get included in?

AndiA

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Problem with code synchronization and C define
« Reply #2 on: October 25, 2007, 11:40:26 pm »
Thanks, that would also be an option.