On 13.05.2011 10:05, MacArthur, Ian (SELEX GALILEO, UK) wrote: > >> Eduardo Suarez schrieb: >>> I'm trying to compile some software which links to another >> library built over fltk-1. >>> >>> It seems to need some destructors defined, but fluid is not >> generating them. >>> >>> Any hint? >> >> Why should fluid generate destructors? > > > Well, I think the key here is that fluid *used* to generate the > destructor stubs, but seems not to now. > > I have a sample fluid file (extracted form the yoshimi project, not of > my creating) created with fluid-1.1 that, when parsed with fluid-1.1 > creates a C++ source file that incorporates stubs for the destructor. > > The same fluid file parsed with fluid-1.3 is *almost* identical, but > does not contain the stub destructor. > > In building the project, the link fails because the destructor is > missing from the sources... > > I do not know if this is the same effect that Eduardo is seeing, but it > sounds very similar. > > It appears that, in so far as creating the destructor stubs, fltk-1.1 > and fltk-1.3 show different behaviour. > Whether the fltk-1.3 (i.e. current) behaviour is considered a regression > or not I can not say, but there is certainly code out "in the wild" that > will be broken by this change.
IIRC, the code you posted recently declared the d'tor in the generated header file (same as in 1.1), but missed the definition in the .cxx file. I believe that this /inconsistency/ is the main problem, because otherwise the compiler would create a default (empty) d'tor, but it can't do that because it is declared explicitly in the .h file. This doesn't answer the question whether FLTK should generate code for a d'tor at all, if not requested by the user's fluid file in any way. OTOH, I'm not a fluid user, so I don't know... Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

