Seite 1 von 1

Compiler error: [moc mainwindow.cpp] Fehler 1 unter kubuntu

Verfasst: 31. August 2010 17:05
von danielp1000
Um die Funktion von QIcon::fromTheme() unter Linux zu testen wollte ich das Projekt unter Kubuntu compiliert. Aber was unter windows fehlerfrei ablief, gab unter Kubuntu den error: [moc mainwindow.cpp] Fehler 1 aus.

Kann mir jemand sagen was das ist?

Vielleicht hilft das ja:

Code: Alles auswählen

moc: Too many input files specified 
Usage: moc [options] <header-file> 
-o<file> write output to file rather than stdout 
-I<dir> add dir to the include path for header files 
-E preprocess only; do not generate meta object code 
-D<macro>[=<def>] define macro, with optional definition 
-U<macro> undefine macro 
-i do not generate an #include statement 
-p<path> path prefix for included file 
-f[<file>] force #include, optional file name 
-nw do not display warnings 
@<file> read additional options from file 
-v display version of moc 
Danke im voraus.

danielp1000

Verfasst: 31. August 2010 20:02
von Christian81
KDE?
Wie rufst du moc auf? Mittels pro-Datei und qmake? wie sieht der moc-Aufruf aus?

Verfasst: 4. September 2010 14:40
von androphinx
Ich gehe mal davon aus, dass du qmake benutzt... Einfach mal Konsole im Projektordner öffnen und eingeben:

Code: Alles auswählen

qmake
make clean
make
So sollte es dann funktionieren, zumindest ist es bei mir so, wenn ich ein Projekt zwischen Windoof und Ubuntu migriere...

Mfg androphinx