You are not logged in.
Hi,
This is a very newbie question, but I don't know where to start . I've got somebody else's qt4 application; build instructions: (1) run qmake; (2) run make.
On make there's an error:
$ make
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iobj -I. -o obj/cmdthread.o cmdthread.cpp
cmdthread.cpp: In member function 'virtual void CCommandThread::run()':
cmdthread.cpp:29: error: 'system' was not declared in this scope
make: *** [obj/cmdthread.o] Error 1
This is cmdthread.cpp:
#include "cmdthread.h"
CCommandThread::CCommandThread() : QThread()
{
// TODO
}void CCommandThread::SetCommand(QString strCmd)
{
m_strCmd = strCmd;
}void CCommandThread::run()
{
m_nResult = system(m_strCmd.toAscii());
}
cmdthread.h:
#include <QThread>
class CCommandThread : public QThread
{
Q_OBJECT
public:
CCommandThread();
void SetCommand(QString strCmd);
void run();
int m_nResult;private:
QString m_strCmd;
};
The project isn't mine, I don't use any development environment and I now nothing about Qt . The project is supposed to be a working release (I know, ask the developer, but there's no contact with him). Probably this isn't a very misterions error, but I don't know where to start...
Last edited by Llama (2009-06-21 08:08:36)
Offline
First thing you should try is to google the error message you got and see if any other people have come across it and have come up with a solution for it.
In this particular case, it seems that cmdthread.cpp is missing a "#include <cstdlib>" which contains the function prototype for system().
If you do compile the application successfully, consider creating a PKGBUILD for it so it can be tracked and later uninstalled with pacman.
Offline
First thing you should try is to google the error message] you got and see if any other people have come across it and have come up with a solution for it.
In this particular case, it seems that cmdthread.cpp is missing a "#include <cstdlib>" which contains the function prototype for system().
Right you are . Thanks! I never expected to find a specific recipe for so generic an error.
Offline