Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: Martin Wawro on August 20, 2012, 07:07:22 pm
-
Hi,
I am working at a multi-platform project and I basically want to generate models from C++ sources for a special platform. The platform-specific stuff is usually put in conditionals (#ifdef). It seems that EA ignores them (seems they always evaluate to true).
Is there any way to teach EA not to consider code in #ifdefs ?
-
A workaround that MAY get you over the line..
Use your C++ compiler to output pre-processed source code. You should then be able to reverse engineer the resulting source code using the standard mechanism and (hopefully!) get the results you're after.
See:
http://stackoverflow.com/questions/277258/c-c-source-file-after-preprocessing
HTH
-
Yes, this is the workaround I also had in mind. It would have been nice though if EA would support this out of the box. Pity.
-
It can be done, but it's not trivial enough to explain here. Contact sparx support and they'll be able to help you.
-
I wonder if the explanation could be placed into a white paper if it is too complex. I suggest that many users have the same problem. :-?