[Kstars-devel] [cvs]Sorry... a little problem of compilation...

Jason Harris kstars at 30doradus.org
Sat Jun 26 10:22:20 CEST 2004


Hello,

On Saturday 26 June 2004 12:33 am, jb wrote:
> kstars.moc:203: error: `slotDownload' undeclared (first use this
> function) 
>
The function slotDownload() is only usable if you have the latest 
kdelibs from CVS.  When you compile KStars against KDE-3.2.x, it is 
supposed to ignore all code related to slotDownload.

Since it reports the error in kstars.moc (which is an auto-generated 
file), I am guessing that the moc compiler is ignoring the preprocessor 
"#if ( KDE_IS_VERSION( 3, 2, 90 ) )" statement I wrapped around the 
declaration of slotDownload() in kstars.h.

So, let's try removing the "#if" statement from kstars.h, and moving the 
"#if" statement in kstarsactions.cpp inside the slotDownload() function 
(rather than wrapping the whole thing).  This way, KDE 3.2.x user will 
have a slotDownload() function, but it will simply be empty (and 
because of "#if" statements elsewhere, it will never be used anyway).
Hopefully, moc will be happier with this situation :)

I am not supposed to commit any changes to CVS until 3.3beta1 is tagged.  
So for now, can you please modify your local copy as follows?:

In kstars.h, remove the "#if"/"#endif" statements surrounding the 
"slotDownload()" declaration.

In kstarsactions.cpp, move the "#if"/"#endif" statements surrounding the 
slotDownload() function to inside the function body:

Your current kstarsactions.cpp looks like this:

#if ( KDE_IS_VERSION( 3, 2, 90 ) )
    void KStars::slotDownload() {
        if (!kns) kns = new KSNewStuff( this );
        kns->download();
    }
#endif //KDE >= 3.2.90

Change it to:
    void KStars::slotDownload() {
#if ( KDE_IS_VERSION( 3, 2, 90 ) )
        if (!kns) kns = new KSNewStuff( this );
        kns->download();
#endif //KDE >= 3.2.90
    }


(note that the "#if"/"#endif" lines cannot be indented at all!)

Please let us know if these changes fix the problem.

> Clear skies, and congratulations for this great soft !!! (I use to
> pilote my LX200 and to demanstrate how linux is made for astronomy !)
>
Thanks!

Jason
-- 
KStars: A KDE Planetarium
http://edu.kde.org/kstars


More information about the Kstars-devel mailing list