[Bug 61164] New: Project, New Class does not generate @include "fielname.moc"

ianw at netspace.net.au ianw at netspace.net.au
Sun Jul 13 00:48:07 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=61164     
           Summary: Project, New Class does not generate @include
                    "fielname.moc"
           Product: kdevelop
           Version: unspecified
          Platform: unspecified
        OS/Version: Linux
            Status: NEW
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: ianw at netspace.net.au


Version:           3.0.0a4 (using KDE 3.1.1)
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB

I am working with TWO targets.  Gideon generated target 1 when I
generated my application as a "C++, KDE, Application framework".
I used "Project, New Class" and it added the new class to target 1,
which compiled and built OK.  Then I added the new class's .cpp file
to target 2.  It compiled OK, but failed to link (using libtool I think).
Errors were "vtable undefined", with references to empty code lines
(i.e. "}" at end of code block).  After hours of trial and error, fiddling
with the source code and adding libraries to target 2, I realised the
REAL BUG is ...

"Project, New Class" does not generate #include "classname.moc"
in the .cpp file, though it knows to generate the "Q_OBJECT" line.

In target 1, file "classname.moc.cpp" was generated (don't know what
that is) and I think it kept the compiler happy.  When I inserted the
missing #include, I STILL got a "classname.moc missing" error,
but after Clean Project, Distclean, Automake and friends, etc., it all
clicked into place and both targets compiled and built OK.

BTW, I don't know whether this is a bug, a blemish, a design problem
or a wish list, but the whole synchronisation of Automake Manager with
generated Makefiles seems to be chancy (particularly where MOC is
involved).  From an end-user's point of view, I never know for certain
how far back in the chain I have to go after I make a code change or
an Automake Manager change.

Often I go right back to Clean Project and Distclean, just to be sure,
but that is very time-consuming and defeats the whole purpose of
KDevelop, doesn't it?




More information about the KDevelop-devel mailing list