Question about Generated Code

Huntress Gary B NPRI <[email protected]> Thu, 23 Jun 2005 14:44:32 -0400
Newsgroups gmane.linux.umbrello.user
Message-ID <A506359028CAD21191C10008C75D895C0C6D525B@NPRI54EXC14.NPT.NUWC.NAVY.MIL>
I am a fairly new user of Umbrello, I've tried both 1.3 and recently 1.4.   I'm mostly interested in c++ code generation, however I consistently have problems that I've experienced on 4 different systems.  Namely, even for a set of very simple classes, the generated code never compiles cleanly.  

Usually as a test case I generate a parent class with a single string attribute and a simple method that is passed an int and returns a string,  a derived child class with another simple attribute and method, and finally a single simple aggregate class that is referenced as an attribute of the parent class.

Code generation completes without error and I would think that I could then issue "gcc -c *cpp" to compile the generated code but invariably I get lots of errors that are almost always associated with the data types.   Sometimes my generated code includes files for the data types (string.h for example) but usually that does not happen and I have not found a way to generate them.  But, even if string.h does exist, the generator does not seem to put an #include "string.h" into the class.

I'm intentionally not including my exact XMI file and my errors.   I'd really just like to know if most users can usually draw up a few related classes, generate c++ code and get it to compile cleanly?


Regards,

Gary Huntress
Code 4113
Naval Undersea Warfare Center
Newport, RI  02841
1-800-669-6892 x28990