-   Linux - Software (
-   -   General question while running make "make[2]: *** [main.o] Error 1" (

matazar42 08-15-2005 03:05 AM

General question while running make "make[2]: *** [main.o] Error 1"
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/home/matthew/helloworld4/helloworld4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/matthew/helloworld4'
make: *** [all] Error 2

I get this error message (or something like it) a lot whenever a program i'm installing fails to run make.

I would like to know what this error means and what to do about it when I get it.

Any help would be appreciated.

On a more specific note I am just starting to learn C++ and tried to run the HelloWorld program with Qt using Kdevelop. The source was cut&pasted from the manual:

#include <qapplication.h>
#include <qpushbutton.h>

int main( int argc, char **argv )
QApplication a( argc, argv );

QPushButton hello( "Hello world!" );
hello.resize( 100, 30 );

a.setMainWidget( &hello );;
return a.exec();

I went:
Build>Auto Config & auto Make

Then the above error.

Any help is appreciated.


P.S. To all of you who take you time out to answer newbie questions
Thank you.
It's gestures like that that make me still believe in the human race.

__J 08-15-2005 04:28 AM

You need to post up farther, the needed output is before where you started posting ( go up about 15 or 20 lines and post from there down).

matazar42 08-15-2005 12:49 PM

[matthew@localhost helloworld4]$ make
cd . \
/bin/sh ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default-1 commands
make all-recursive
make[1]: Entering directory `/home/matthew/helloworld4'
Making all in helloworld4
make[2]: Entering directory `/home/matthew/helloworld4/helloworld4'
source='helloworld4view.cpp' object='helloworld4view.o' libtool=no \
depfile='.deps/helloworld4view.Po' tmpdepfile='.deps/helloworld4view.TPo' \
depmode=gcc3 /bin/sh ../admin/depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/lib/qt-3.1/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c -o helloworld4view.o `test -f helloworld4view.cpp || echo './'`helloworld4view.cpp
source='helloworld4doc.cpp' object='helloworld4doc.o' libtool=no \
depfile='.deps/helloworld4doc.Po' tmpdepfile='.deps/helloworld4doc.TPo' \
depmode=gcc3 /bin/sh ../admin/depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/lib/qt-3.1/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c -o helloworld4doc.o `test -f helloworld4doc.cpp || echo './'`helloworld4doc.cpp
helloworld4doc.cpp: In member function `bool Helloworld4Doc::openDocument(const
KURL&, const char*)':
helloworld4doc.cpp:145: warning: unused parameter `const char*format'
helloworld4doc.cpp: In member function `bool Helloworld4Doc::saveDocument(const
KURL&, const char*)':
helloworld4doc.cpp:159: warning: unused parameter `const KURL&url'
helloworld4doc.cpp:159: warning: unused parameter `const char*format'
source='helloworld4.cpp' object='helloworld4.o' libtool=no \
depfile='.deps/helloworld4.Po' tmpdepfile='.deps/helloworld4.TPo' \
depmode=gcc3 /bin/sh ../admin/depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/lib/qt-3.1/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c -o helloworld4.o `test -f helloworld4.cpp || echo './'`helloworld4.cpp
source='main.cpp' object='main.o' libtool=no \
depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
depmode=gcc3 /bin/sh ../admin/depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/lib/qt-3.1/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c -o main.o `test -f main.cpp || echo './'`main.cpp
main.cpp: In function `int main(int, char**)':
main.cpp:8: no matching function for call to `QPushButton::QPushButton(const
/usr/lib/qt-3.1/include/qpushbutton.h:134: candidates are:
QPushButton::QPushButton(const QPushButton&)
QPushButton::QPushButton(const QIconSet&, const QString&, QWidget*, const
char* = 0)
QPushButton::QPushButton(const QString&, QWidget*, const char* = 0)
QPushButton::QPushButton(QWidget*, const char* = 0)
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/home/matthew/helloworld4/helloworld4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/matthew/helloworld4'
make: *** [all] Error 2

I still would like to know what the last part of the error means by itself.
If not for now then for future reference.


number9 08-15-2005 01:39 PM

You might need to install the libraries and/or development packages for QT from the Red Hat disc, or get the RPMs from That QPushButton stuff is a function that is being called by the Hello World program that comes with KDevelop.

You can do a search for 'qt-devel', with radio button "Search for rpms by name. " selected.

All times are GMT -5. The time now is 11:54 AM.