Book a Demo

Author Topic: Control order of #include files in generated code  (Read 3056 times)

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Control order of #include files in generated code
« on: June 25, 2010, 10:26:21 am »
How can I control the order of the #include files when generating code from a class that inherits from a class and aggregates some others (and thus has some generated "#include" statements)?

The #include statements seem to show up in random order.

EA 7.5.850.

(I beg you, *_PLEASE_* don't tell me that code shouldn't depend on the order of #include files.  I know this.  There are some things on this project over which I have only limited (or no) control.)
« Last Edit: June 25, 2010, 10:46:14 am by rkt-med »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Control order of #include files in generated c
« Reply #1 on: June 25, 2010, 01:58:58 pm »
You can't specify the order for #includes that EA generates.

Two things that may help.  You can type manual includes to be generated into the code generation dialog (for a single class).  EA will prevent duplicates so you may be able to use this to get a specific order.

Code Synchronization will not replace your #includes, so if you correct it once then use synchronization EA won't screw up your work.