diff --git a/Makefile.am b/Makefile.am index 3a32d73bb5..b3c69850a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,5 +32,5 @@ sounddir= $(kde_sounddir) sound_DATA = pop.wav dummy.cpp: - echo > dummy.cpp + echo 'extern "C" { int kdemain(int, char *[]);} int main(int c, char *v[]) { return kdemain(c,v); }' > dummy.cpp diff --git a/client.cpp b/client.cpp index 3e7e1f1bd9..6565f6e7d7 100644 --- a/client.cpp +++ b/client.cpp @@ -2573,7 +2573,7 @@ NoBorderClient::~NoBorderClient() { } -QPixmap * kwin_get_menu_pix_hack() +static QPixmap * kwin_get_menu_pix_hack() { static QPixmap p; if ( p.isNull() ) diff --git a/main.cpp b/main.cpp index 0a08480785..ae77677d2c 100644 --- a/main.cpp +++ b/main.cpp @@ -192,7 +192,9 @@ static void sighandler(int) { static const char *version = "0.5"; static const char *description = I18N_NOOP( "The KDE window manager." ); -int main( int argc, char * argv[] ) +extern "C" { int kdemain(int, char *[]); } + +int kdemain( int argc, char * argv[] ) { KAboutData aboutData( "kwin", I18N_NOOP("KWin"), version, description, KAboutData::License_BSD,