Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, May 2007
compile error


Message 1 in thread

Hi, all
I am using qt4.
I have made  a  GUI for a milling CNC by qt4. And I have compile it and link
it with other parts (be written in c and c++ languages)of my CNC project, so
I write makefile by myself not by qmake. Then when I make it in a shell
terminal on ubuntu ,a few errors occure which I could't understand at all,
because the errors seems to be qt4's errors:

/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro "toLine" requires 2
arguments, but only 1 given
In file included from /usr/include/qt4/QtCore/QtCore:61,
                 from /usr/include/qt4/QtGui/QtGui:1,
                 from emc/usr_intf/mainwindow.h:24,
                 from emc/usr_intf/mainwindow.cc:1:
/usr/include/qt4/QtCore/qline.h:191:18: error: macro "toLine" requires 2
arguments, but only 1 given
/usr/include/qt4/QtCore/qline.h:287:29: error: macro "toLine" requires 2
arguments, but only 1 given
/usr/include/qt4/QtCore/qvariant.h:226: error:  field 'toLine' has
incompleteness type.
/usr/include/qt4/QtCore/qvariant.h:226: error: expected ';' before 'const'
/usr/include/qt4/QtCore/qline.h:191: error: expected ';' before 'const'
/usr/include/qt4/QtCore/qline.h:287: error: expected initializer before
'const'
make: *** [emc/usr_intf/mainwindow.o] error 1

Has anyone experience this problems?
Thank you
Regards
Fengli

Message 2 in thread

Hi,

> /usr/include/qt4/QtCore/qline.h:191:18: error: macro "toLine" requires 2 
> arguments, but only 1 given

There's no macro in qline.h. It looks like a "toLine" macro is defined 
somewhere else in your code. Don't use macros, use inline functions instead.

--
 [ signature omitted ] 

Message 3 in thread

Hi,
But I didn't define any macro named toLine.
Regards
Fengli

2007/5/20, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
>
> Hi, all
> I am using qt4.
> I have made  a  GUI for a milling CNC by qt4. And I have compile it and
> link it with other parts (be written in c and c++ languages)of my CNC
> project, so I write makefile by myself not by qmake. Then when I make it in
> a shell terminal on ubuntu ,a few errors occure which I could't understand
> at all, because the errors seems to be qt4's errors:
>
> /usr/include/qt4/QtCore/qvariant.h:226:18: error: macro "toLine" requires
> 2 arguments, but only 1 given
> In file included from /usr/include/qt4/QtCore/QtCore:61,
>                  from /usr/include/qt4/QtGui/QtGui:1,
>                  from emc/usr_intf/mainwindow.h:24,
>                  from emc/usr_intf/mainwindow.cc:1:
> /usr/include/qt4/QtCore/qline.h:191:18: error: macro "toLine" requires 2
> arguments, but only 1 given
> /usr/include/qt4/QtCore/qline.h:287:29: error: macro "toLine" requires 2
> arguments, but only 1 given
> /usr/include/qt4/QtCore/qvariant.h:226: error:  field 'toLine' has
> incompleteness type.
> /usr/include/qt4/QtCore/qvariant.h:226: error: expected ';' before 'const'
> /usr/include/qt4/QtCore/qline.h:191: error: expected ';' before 'const'
> /usr/include/qt4/QtCore/qline.h:287: error: expected initializer before
> 'const'
> make: *** [emc/usr_intf/mainwindow.o] error 1
>
> Has anyone experience this problems?
> Thank you
> Regards
> Fengli
>

Message 4 in thread


Obviously, it's defined somewhere else.:)
> Hi,
> But I didn't define any macro named toLine.
> Regards
> Fengli
> 
> 2007/5/20, 张凤丽 <zhangfenglisdu@xxxxxxxxx
> <mailto:zhangfenglisdu@xxxxxxxxx>>:
> 
>     Hi, all
>     I am using qt4.
>     I have made  a  GUI for a milling CNC by qt4. And I have compile it
>     and link it with other parts (be written in c and c++ languages)of
>     my CNC project, so I write makefile by myself not by qmake. Then
>     when I make it in a shell terminal on ubuntu ,a few errors occure
>     which I could't understand at all, because the errors seems to be
>     qt4's errors:
> 
>     /usr/include/qt4/QtCore/qvariant.h:226:18: error: macro "toLine"
>     requires 2 arguments, but only 1 given
>     In file included from /usr/include/qt4/QtCore/QtCore:61,
>                      from /usr/include/qt4/QtGui/QtGui:1,
>                      from emc/usr_intf/mainwindow.h:24,
>                      from emc/usr_intf/mainwindow.cc:1:
>     /usr/include/qt4/QtCore/qline.h:191:18: error: macro "toLine"
>     requires 2 arguments, but only 1 given
>     /usr/include/qt4/QtCore/qline.h:287:29: error: macro "toLine"
>     requires 2 arguments, but only 1 given
>     /usr/include/qt4/QtCore/qvariant.h:226: error:  field 'toLine' has
>     incompleteness type.
>     /usr/include/qt4/QtCore/qvariant.h:226: error: expected ';' before
>     'const'
>     /usr/include/qt4/QtCore/qline.h:191: error: expected ';' before 'const'
>     /usr/include/qt4/QtCore/qline.h:287: error: expected initializer
>     before 'const'
>     make: *** [emc/usr_intf/mainwindow.o] error 1
> 
>     Has anyone experience this problems?
>     Thank you
>     Regards
>     Fengli
> 
> 

--
 [ signature omitted ] 

Message 5 in thread

Hi,

> But I didn't define any macro named toLine.

Then it's defined in some of the headers you're using, such as "posemath.h".

Try including Qt headers before your other headers:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <ctype.h>
#include <math.h>
#include <sys/types.h>

#include <QtCore>
#include <QtGui>
#include "ui_mainwindow.h"

#include "rcs.hh"
#include "posemath.h"	// PM_POSE, TO_RAD
#include "emc.hh"	// EMC NML
#include "nml.hh"
#include "canon.hh"	// CANON_UNITS, CANON_UNITS_INCHES,MM,CM
#include "emcglb.h"	// EMC_NMLFILE, TRAJ_MAX_VELOCITY, etc.
#include "emccfg.h"	// DEFAULT_TRAJ_MAX_VELOCITY
#include "inifile.hh"	// INIFILE
#include "nml_oi.hh"    // nmlErrorFormat, NML_ERROR, etc
#include "rcs_print.hh"
#include "timer.hh"     // esleep
#include "editor.h"
#include "shcom.hh"

--
 [ signature omitted ] 

Message 6 in thread

Hi
You are so great. I does find a macro named toLine in posemath.h which also
be used in posemath.cc. Thank you very much. Great!
Best wishes
Fengli

2007/5/20, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
>
> Hi,
> But I didn't define any macro named toLine.
> Regards
> Fengli
>
> 2007/5/20, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
> >
> > Hi, all
> > I am using qt4.
> > I have made  a  GUI for a milling CNC by qt4. And I have compile it and
> > link it with other parts (be written in c and c++ languages)of my CNC
> > project, so I write makefile by myself not by qmake. Then when I make it in
> > a shell terminal on ubuntu ,a few errors occure which I could't understand
> > at all, because the errors seems to be qt4's errors:
> >
> > /usr/include/qt4/QtCore/qvariant.h:226:18: error: macro "toLine"
> > requires 2 arguments, but only 1 given
> > In file included from /usr/include/qt4/QtCore/QtCore:61,
> >                  from /usr/include/qt4/QtGui/QtGui:1,
> >                  from emc/usr_intf/mainwindow.h:24,
> >                  from emc/usr_intf/mainwindow.cc:1:
> > /usr/include/qt4/QtCore/qline.h:191:18: error: macro "toLine" requires 2
> > arguments, but only 1 given
> > /usr/include/qt4/QtCore/qline.h:287:29: error: macro "toLine" requires 2
> > arguments, but only 1 given
> > /usr/include/qt4/QtCore/qvariant.h:226: error:  field 'toLine' has
> > incompleteness type.
> > /usr/include/qt4/QtCore/qvariant.h:226: error: expected ';' before
> > 'const'
> > /usr/include/qt4/QtCore/qline.h:191: error: expected ';' before 'const'
> > /usr/include/qt4/QtCore/qline.h:287: error: expected initializer before
> > 'const'
> > make: *** [emc/usr_intf/mainwindow.o] error 1
> >
> > Has anyone experience this problems?
> > Thank you
> > Regards
> > Fengli
> >
>
>

Message 7 in thread

Hi,once again
But I have had a test by using a small program--hello qt, and I could
compile it and like it with the other parts of my cnc project without any
error. Also, I could execute it successfully. What does this mean? The
makefile I wrote has no errors and I could make use of "make" tool. But
still, my GUI codes couldn't be compiled through. The same error as that I
have posted last mail.
Regards
Fengli


19 May 2007 19:02:00 -0700, Scott Aron Bloom <scott@xxxxxxxxxxxx>:
>
> there is no reason why you can't use qmake on non qt code...
>
> However, if you really want to use a custom make for non-qt cpde..  I
> recommend, you put the qt code in its own lib or libs... And just link it in
> with your custom make... Your make can even call qmake
>
> --Scott
> -----Original Message-----
> From: "=?GB2312?B?1cW378D2?=" <zhangfenglisdu@xxxxxxxxx>
> Date: Saturday, May 19, 2007 6:36 pm
> Subject: compile error
> To: qt-interest <qt-interest@xxxxxxxxxxxxx>
>
> Hi, all
> >I am using qt4.
> >I have made  a  GUI for a milling CNC by qt4. And I have compile it and
> link it with other parts (be written in c and c++ languages)of my CNC
> project, so I write makefile by myself not by qmake. Then when I make it in
> a shell terminal on ubuntu ,a few errors occure which I could't understand
> at all, because the errors seems to be qt4's errors:
> >
> >/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro 'toLine' requires
> 2 arguments, but only 1 given
> >In file included from /usr/include/qt4/QtCore/QtCore:61,
> >                 from /usr/include/qt4/QtGui/QtGui:1,
> >                 from emc/usr_intf/mainwindow.h:24,
> >                 from emc/usr_intf/mainwindow.cc:1:
> >/usr/include/qt4/QtCore/qline.h:191:18: error: macro 'toLine' requires 2
> arguments, but only 1 given
> >/usr/include/qt4/QtCore/qline.h:287:29: error: macro 'toLine' requires 2
> arguments, but only 1 given
> >/usr/include/qt4/QtCore/qvariant.h:226: error£º  field 'toLine' has
> incompleteness type.
> >/usr/include/qt4/QtCore/qvariant.h:226: error£º expected ';' before
> 'const'
> >/usr/include/qt4/QtCore/qline.h:191: error£º expected ';' before 'const'
> >/usr/include/qt4/QtCore/qline.h:287: error£º expected initializer before
> 'const'
> >make: *** [emc/usr_intf/mainwindow.o] error 1
> >
> >Has anyone experience this problems?
> >Thank you
> >Regards
> >Fengli
> >
>
>

Message 8 in thread

It seems that the problem occurs in your mainwindow.h.
How about posting it here?

> Hi,once again
> But I have had a test by using a small program--hello qt, and I could
> compile it and like it with the other parts of my cnc project without
> any error. Also, I could execute it successfully. What does this mean?
> The makefile I wrote has no errors and I could make use of "make" tool.
> But still, my GUI codes couldn't be compiled through. The same error as
> that I have posted last mail.
> Regards
> Fengli
> 
> 
> 19 May 2007 19:02:00 -0700, Scott Aron Bloom <scott@xxxxxxxxxxxx
> <mailto:scott@xxxxxxxxxxxx>>:
> 
>     there is no reason why you can't use qmake on non qt code...
> 
>     However, if you really want to use a custom make for non-qt
>     cpde..  I recommend, you put the qt code in its own lib or libs...
>     And just link it in with your custom make... Your make can even call
>     qmake
> 
>     --Scott
>     -----Original Message-----
>     From: "=?GB2312?B?1cW378D2?=" <zhangfenglisdu@xxxxxxxxx
>     <mailto:zhangfenglisdu@xxxxxxxxx>>
>     Date: Saturday, May 19, 2007 6:36 pm
>     Subject: compile error
>     To: qt-interest <qt-interest@xxxxxxxxxxxxx
>     <mailto:qt-interest@xxxxxxxxxxxxx>>
> 
>     Hi, all
>     >I am using qt4.
>     >I have made  a  GUI for a milling CNC by qt4. And I have compile it
>     and link it with other parts (be written in c and c++ languages)of
>     my CNC project, so I write makefile by myself not by qmake. Then
>     when I make it in a shell terminal on ubuntu ,a few errors occure
>     which I could't understand at all, because the errors seems to be
>     qt4's errors:
>     >
>     >/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro 'toLine'
>     requires 2 arguments, but only 1 given
>     >In file included from /usr/include/qt4/QtCore/QtCore:61,
>     >                 from /usr/include/qt4/QtGui/QtGui:1,
>     >                 from emc/usr_intf/mainwindow.h:24,
>     >                 from emc/usr_intf/mainwindow.cc:1:
>     >/usr/include/qt4/QtCore/qline.h:191:18: error: macro 'toLine'
>     requires 2 arguments, but only 1 given
>     >/usr/include/qt4/QtCore/qline.h:287:29: error: macro 'toLine'
>     requires 2 arguments, but only 1 given
>     >/usr/include/qt4/QtCore/qvariant.h:226: error£º  field 'toLine' has
>     incompleteness type.
>     >/usr/include/qt4/QtCore/qvariant.h:226: error£º expected ';' before
>     'const'
>     >/usr/include/qt4/QtCore/qline.h:191: error£º expected ';' before
>     'const'
>     >/usr/include/qt4/QtCore/qline.h:287: error£º expected initializer
>     before 'const'
>     >make: *** [emc/usr_intf/mainwindow.o] error 1
>     >
>     >Has anyone experience this problems?
>     >Thank you
>     >Regards
>     >Fengli
>     >
> 
> 

--
 [ signature omitted ] 

Message 9 in thread

Hi,
I have upload the mainwindow.h which is in the accessory.
Regards
Fengli

2007/5/20, ååä <zhangfenglisdu@xxxxxxxxx>:
>
> Hi,once again
> But I have had a test by using a small program--hello qt, and I could
> compile it and like it with the other parts of my cnc project without any
> error. Also, I could execute it successfully. What does this mean? The
> makefile I wrote has no errors and I could make use of "make" tool. But
> still, my GUI codes couldn't be compiled through. The same error as that I
> have posted last mail.
> Regards
> Fengli
>
>
> 19 May 2007 19:02:00 -0700, Scott Aron Bloom <scott@xxxxxxxxxxxx>:
> >
> > there is no reason why you can't use qmake on non qt code...
> >
> > However, if you really want to use a custom make for non-qt cpde..  I
> > recommend, you put the qt code in its own lib or libs... And just link it in
> > with your custom make... Your make can even call qmake
> >
> > --Scott
> > -----Original Message-----
> > From: "=?GB2312?B?1cW378D2?=" <zhangfenglisdu@xxxxxxxxx>
> > Date: Saturday, May 19, 2007 6:36 pm
> > Subject: compile error
> > To: qt-interest <qt-interest@xxxxxxxxxxxxx>
> >
> > Hi, all
> > >I am using qt4.
> > >I have made  a  GUI for a milling CNC by qt4. And I have compile it and
> > link it with other parts (be written in c and c++ languages)of my CNC
> > project, so I write makefile by myself not by qmake. Then when I make it in
> > a shell terminal on ubuntu ,a few errors occure which I could't understand
> > at all, because the errors seems to be qt4's errors:
> > >
> > >/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro 'toLine'
> > requires 2 arguments, but only 1 given
> > >In file included from /usr/include/qt4/QtCore/QtCore:61,
> > >                 from /usr/include/qt4/QtGui/QtGui:1,
> > >                 from emc/usr_intf/mainwindow.h:24,
> > >                 from emc/usr_intf/mainwindow.cc:1:
> > >/usr/include/qt4/QtCore/qline.h:191:18: error: macro 'toLine' requires
> > 2 arguments, but only 1 given
> > >/usr/include/qt4/QtCore/qline.h:287:29: error: macro 'toLine' requires
> > 2 arguments, but only 1 given
> > >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ  field 'toLine' has
> > incompleteness type.
> > >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ expected ';' before
> > 'const'
> > >/usr/include/qt4/QtCore/qline.h:191: errorÂÂ expected ';' before
> > 'const'
> > >/usr/include/qt4/QtCore/qline.h:287: errorÂÂ expected initializer
> > before 'const'
> > >make: *** [emc/usr_intf/mainwindow.o] error 1
> > >
> > >Has anyone experience this problems?
> > >Thank you
> > >Regards
> > >Fengli
> > >
> >
> >
>
#ifndef MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <ctype.h>
#include <math.h>
#include <sys/types.h>

#include "rcs.hh"
#include "posemath.h"	// PM_POSE, TO_RAD
#include "emc.hh"	// EMC NML
#include "nml.hh"
#include "canon.hh"	// CANON_UNITS, CANON_UNITS_INCHES,MM,CM
#include "emcglb.h"	// EMC_NMLFILE, TRAJ_MAX_VELOCITY, etc.
#include "emccfg.h"	// DEFAULT_TRAJ_MAX_VELOCITY
#include "inifile.hh"	// INIFILE
#include "nml_oi.hh"    // nmlErrorFormat, NML_ERROR, etc
#include "rcs_print.hh"
#include "timer.hh"     // esleep
#include <QtGui>
#include <QtCore>
#include "ui_mainwindow.h"
#include "editor.h"
#include "shcom.hh"

class MainWindow : public QMainWindow, public Ui::MainWindow
{
	Q_OBJECT
public:
	MainWindow();
protected:
	void closeEvent(QCloseEvent *event);
	void paintEvent(QPaintEvent *event);
private slots:
	void quit();
	void taskPlanInit();
	void clickXYPushButton();
	void clickXZPushButton();
	void clickYZPushButton();
	void click3DPushButton();
	void redraw(QPainter p);
	void togglePlotSetup();
	void showPositionType(bool checked);
	void showToolInfo(bool checked);
	void showOffsetInfo(bool checked);
	void showRestart();
	void hideRestart();
	void toggleCmdAct();
	void toggleRelAbs();
	void showProgramFile();
	void showEditorFile();
	void showParameterFile();
	void showToolFile();
	void showActiveGCodes();
	void updateGui();
	void toggleMdi(bool checked);
	void toggleAuto(bool checked);
	void toggleManual(bool checked);
	void toggleEstop();
	void toggleAbort(bool checked);
	void toggleFeedhold();
	void popInPlot(bool checked);
	void popInEditor(bool checked);
	//void popInOffsets(bool checked);
	void popInTools(bool checked);
	void sendmdi();
	void clickDefault();
	void clickRapid();
	void clickIncrement();
	void clickContinuous();
	void setAllZero();
	void setZero();
	void jogMinus();
	void jogStop();
	void jogPlus();
	void spindleForward();
	void spindleReverse();
	void spindleOff();
	void pressSpindleSlower();
	void releaseSpindleSlower();
	void pressSpindleFaster();
	void releaseSpindleFaster();
	void toggleBrake(bool checked);
	void toggleMist(bool checked);
	void toggleFlood(bool checked);
	void fileDialog();
	void run();
	void pause();
	void resume();
	void step();
	void verify();
	void back();
	void ahead();
	void restart();
	void addTool();
	void removeTool();
	bool updateToolfile();
	void tempSlot();
	void axisSelectx(int axis);
signals:
	void tempSignal(int axis);
private:
	void iniVar();
	void createMenubar();
	void createToolbar();
	void createLeftWidgets();
	void readSettings();
	void writeSettings();
	double vector(double x, double y, double z,double a, double b, double c);
	void threeDView(QPainter p);
	void updatePlot(QPainter p);
	double relcmdpos(int axis);
	double relactpos(int axis);
	double abscmdpos(int axis);
	double absactpos(int axis);
	QString getProgramStatus();
	QString getProgramCodeString();
	bool loadToolText();
	void loadProgramText(QString programnamestring);
	void loadProgram(QString programnamestring);
	void changeProgram();
	void jogNeg( int axis);
	void jogPos(int axis);
	void findVarNumbers(double);
	void findVarValues();	
	int iniLoad(QString filename);

	int xdir;
	int ydir;
	int zdir;
	int adir;
	int bdir;
	int cdir;
	int size;
	double xlast;
	double xnext;
	double ylast;
	double ynext; 
	double zlast;
	double znext;
	double X;
	double Y;
	double Z; 
	double A;
	double B;
	double C;
	int zoom;
	double Xlast;
	double Ylast;
	double Zlast;
	double Alast;
	double Blast;
	double Clast;
	double Glast;
	QList<double> threed_plot;
	double a_plot;
	double b_plot;
	double c_plot;
	double delta_Alast;
	double delta_Blast;
	double delta_Clast;
	int plotSetup;
	
	QTimer *timer;	
	Editor *editor;
	QString unitsetting;
	QString oldunitsetting;
	QString modeInDisplay;
	QString oldmode;
	QString jointworld;
	QString lastjointworld;
	int displayCycleTime;
	QString coords;
	QString actcmd;
	int maxFeedOverride;
	QString programDirectory;
	QString lastactcmd;
	QString lastcoords;	
	QString programcodestring;
	QString feedvalue;	
	QString paramfilename;
	QString PARAMETER_FILE;
	QString toolfilename;
	QString TOOL_TABLE_FILE;
	QString editFilename;	
	QString programnamestring;
	QString programstatusstring;
	QString oldstatusstring;
	QString programin;
	QString jogType;
	QStringList offsetsetting;
	QString offsetsettingstr;
	QStringList worldlabel;
	QStringList worldlabellist;
	QStringList poslabel;
	QStringList axisType;
	QStringList coordnames;
	QList<double> val;
	QList<double> oval;
	QList<double> num;
	QList<int> axiscoordmap; 
	QList<int> jointlabel;
	QList<double> posdigit;
	QString axname;
	int emc_teleop_enable_command_given;
	int feedoverride;
	int lastfeedoverride;
	int toolnum;
	int columnCount;
	int rowCount;
	int activeLine;
	int programStartLine;
	int runMark;
	int restartline;
	int oldrestartline;
	int numaxis;
	int activeAxis;	
	int numcoords;	
	int axnum;
	QList<int> maxJogSpeedAxis;
	int defaultJogSpeed;
	int maxJogSpeed;
	double jogSpeed;
	double toolsetting;
	double tooloffsetsetting;
	double jogIncrement;
	double linjogincr;
	double oldlinjogincr;
	double oldrotjogincr;
	double rotjogincr;
	double coordsys;
	EMC_TASK_MODE_ENUM mode;
};

#endif


Message 10 in thread

Well, how is your makefile?
Have you add Qt in your include path?
/usr/include/qt4/QtGui
or
/usr/include/qt4/Qt
?

ååä åé:
> Hi,
> I have upload the mainwindow.h which is in the accessory.
> Regards
> Fengli
> 
> 2007/5/20, ååä <zhangfenglisdu@xxxxxxxxx
> <mailto:zhangfenglisdu@xxxxxxxxx>>:
> 
>     Hi,once again
>     But I have had a test by using a small program--hello qt, and I
>     could compile it and like it with the other parts of my cnc project
>     without any error. Also, I could execute it successfully. What does
>     this mean? The makefile I wrote has no errors and I could make use
>     of "make" tool. But still, my GUI codes couldn't be compiled
>     through. The same error as that I have posted last mail.
>     Regards
>     Fengli
> 
> 
>     19 May 2007 19:02:00 -0700, Scott Aron Bloom < scott@xxxxxxxxxxxx
>     <mailto:scott@xxxxxxxxxxxx>>:
> 
>         there is no reason why you can't use qmake on non qt code...
> 
>         However, if you really want to use a custom make for non-qt
>         cpde..  I recommend, you put the qt code in its own lib or
>         libs... And just link it in with your custom make... Your make
>         can even call qmake
> 
>         --Scott
>         -----Original Message-----
>         From: "=?GB2312?B?1cW378D2?=" <zhangfenglisdu@xxxxxxxxx
>         <mailto:zhangfenglisdu@xxxxxxxxx>>
>         Date: Saturday, May 19, 2007 6:36 pm
>         Subject: compile error
>         To: qt-interest <qt-interest@xxxxxxxxxxxxx
>         <mailto:qt-interest@xxxxxxxxxxxxx>>
> 
>         Hi, all
>         >I am using qt4.
>         >I have made  a  GUI for a milling CNC by qt4. And I have compile
>         it and link it with other parts (be written in c and c++
>         languages)of my CNC project, so I write makefile by myself not
>         by qmake. Then when I make it in a shell terminal on ubuntu ,a
>         few errors occure which I could't understand at all, because the
>         errors seems to be qt4's errors:
>         >
>         >/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro 'toLine'
>         requires 2 arguments, but only 1 given
>         >In file included from /usr/include/qt4/QtCore/QtCore:61,
>         >                 from /usr/include/qt4/QtGui/QtGui:1,
>         >                 from emc/usr_intf/mainwindow.h:24,
>         >                 from emc/usr_intf/mainwindow.cc:1:
>         >/usr/include/qt4/QtCore/qline.h:191:18: error: macro 'toLine'
>         requires 2 arguments, but only 1 given
>         >/usr/include/qt4/QtCore/qline.h:287:29: error: macro 'toLine'
>         requires 2 arguments, but only 1 given
>         >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ  field 'toLine'
>         has incompleteness type.
>         >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ expected ';'
>         before 'const'
>         >/usr/include/qt4/QtCore/qline.h:191: errorÂÂ expected ';' before
>         'const'
>         >/usr/include/qt4/QtCore/qline.h:287: errorÂÂ expected
>         initializer before 'const'
>         >make: *** [emc/usr_intf/mainwindow.o] error 1
>         >
>         >Has anyone experience this problems?
>         >Thank you
>         >Regards
>         >Fengli
>         >
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> #ifndef MAINWINDOW_H
> #define MAINWINDOW_H
> 
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
> #include <signal.h>
> #include <unistd.h>
> #include <ctype.h>
> #include <math.h>
> #include <sys/types.h>
> 
> #include "rcs.hh"
> #include "posemath.h"	// PM_POSE, TO_RAD
> #include "emc.hh"	// EMC NML
> #include "nml.hh"
> #include "canon.hh"	// CANON_UNITS, CANON_UNITS_INCHES,MM,CM
> #include "emcglb.h"	// EMC_NMLFILE, TRAJ_MAX_VELOCITY, etc.
> #include "emccfg.h"	// DEFAULT_TRAJ_MAX_VELOCITY
> #include "inifile.hh"	// INIFILE
> #include "nml_oi.hh"    // nmlErrorFormat, NML_ERROR, etc
> #include "rcs_print.hh"
> #include "timer.hh"     // esleep
> #include <QtGui>
> #include <QtCore>
> #include "ui_mainwindow.h"
> #include "editor.h"
> #include "shcom.hh"
> 
> class MainWindow : public QMainWindow, public Ui::MainWindow
> {
> 	Q_OBJECT
> public:
> 	MainWindow();
> protected:
> 	void closeEvent(QCloseEvent *event);
> 	void paintEvent(QPaintEvent *event);
> private slots:
> 	void quit();
> 	void taskPlanInit();
> 	void clickXYPushButton();
> 	void clickXZPushButton();
> 	void clickYZPushButton();
> 	void click3DPushButton();
> 	void redraw(QPainter p);
> 	void togglePlotSetup();
> 	void showPositionType(bool checked);
> 	void showToolInfo(bool checked);
> 	void showOffsetInfo(bool checked);
> 	void showRestart();
> 	void hideRestart();
> 	void toggleCmdAct();
> 	void toggleRelAbs();
> 	void showProgramFile();
> 	void showEditorFile();
> 	void showParameterFile();
> 	void showToolFile();
> 	void showActiveGCodes();
> 	void updateGui();
> 	void toggleMdi(bool checked);
> 	void toggleAuto(bool checked);
> 	void toggleManual(bool checked);
> 	void toggleEstop();
> 	void toggleAbort(bool checked);
> 	void toggleFeedhold();
> 	void popInPlot(bool checked);
> 	void popInEditor(bool checked);
> 	//void popInOffsets(bool checked);
> 	void popInTools(bool checked);
> 	void sendmdi();
> 	void clickDefault();
> 	void clickRapid();
> 	void clickIncrement();
> 	void clickContinuous();
> 	void setAllZero();
> 	void setZero();
> 	void jogMinus();
> 	void jogStop();
> 	void jogPlus();
> 	void spindleForward();
> 	void spindleReverse();
> 	void spindleOff();
> 	void pressSpindleSlower();
> 	void releaseSpindleSlower();
> 	void pressSpindleFaster();
> 	void releaseSpindleFaster();
> 	void toggleBrake(bool checked);
> 	void toggleMist(bool checked);
> 	void toggleFlood(bool checked);
> 	void fileDialog();
> 	void run();
> 	void pause();
> 	void resume();
> 	void step();
> 	void verify();
> 	void back();
> 	void ahead();
> 	void restart();
> 	void addTool();
> 	void removeTool();
> 	bool updateToolfile();
> 	void tempSlot();
> 	void axisSelectx(int axis);
> signals:
> 	void tempSignal(int axis);
> private:
> 	void iniVar();
> 	void createMenubar();
> 	void createToolbar();
> 	void createLeftWidgets();
> 	void readSettings();
> 	void writeSettings();
> 	double vector(double x, double y, double z,double a, double b, double c);
> 	void threeDView(QPainter p);
> 	void updatePlot(QPainter p);
> 	double relcmdpos(int axis);
> 	double relactpos(int axis);
> 	double abscmdpos(int axis);
> 	double absactpos(int axis);
> 	QString getProgramStatus();
> 	QString getProgramCodeString();
> 	bool loadToolText();
> 	void loadProgramText(QString programnamestring);
> 	void loadProgram(QString programnamestring);
> 	void changeProgram();
> 	void jogNeg( int axis);
> 	void jogPos(int axis);
> 	void findVarNumbers(double);
> 	void findVarValues();	
> 	int iniLoad(QString filename);
> 
> 	int xdir;
> 	int ydir;
> 	int zdir;
> 	int adir;
> 	int bdir;
> 	int cdir;
> 	int size;
> 	double xlast;
> 	double xnext;
> 	double ylast;
> 	double ynext; 
> 	double zlast;
> 	double znext;
> 	double X;
> 	double Y;
> 	double Z; 
> 	double A;
> 	double B;
> 	double C;
> 	int zoom;
> 	double Xlast;
> 	double Ylast;
> 	double Zlast;
> 	double Alast;
> 	double Blast;
> 	double Clast;
> 	double Glast;
> 	QList<double> threed_plot;
> 	double a_plot;
> 	double b_plot;
> 	double c_plot;
> 	double delta_Alast;
> 	double delta_Blast;
> 	double delta_Clast;
> 	int plotSetup;
> 	
> 	QTimer *timer;	
> 	Editor *editor;
> 	QString unitsetting;
> 	QString oldunitsetting;
> 	QString modeInDisplay;
> 	QString oldmode;
> 	QString jointworld;
> 	QString lastjointworld;
> 	int displayCycleTime;
> 	QString coords;
> 	QString actcmd;
> 	int maxFeedOverride;
> 	QString programDirectory;
> 	QString lastactcmd;
> 	QString lastcoords;	
> 	QString programcodestring;
> 	QString feedvalue;	
> 	QString paramfilename;
> 	QString PARAMETER_FILE;
> 	QString toolfilename;
> 	QString TOOL_TABLE_FILE;
> 	QString editFilename;	
> 	QString programnamestring;
> 	QString programstatusstring;
> 	QString oldstatusstring;
> 	QString programin;
> 	QString jogType;
> 	QStringList offsetsetting;
> 	QString offsetsettingstr;
> 	QStringList worldlabel;
> 	QStringList worldlabellist;
> 	QStringList poslabel;
> 	QStringList axisType;
> 	QStringList coordnames;
> 	QList<double> val;
> 	QList<double> oval;
> 	QList<double> num;
> 	QList<int> axiscoordmap; 
> 	QList<int> jointlabel;
> 	QList<double> posdigit;
> 	QString axname;
> 	int emc_teleop_enable_command_given;
> 	int feedoverride;
> 	int lastfeedoverride;
> 	int toolnum;
> 	int columnCount;
> 	int rowCount;
> 	int activeLine;
> 	int programStartLine;
> 	int runMark;
> 	int restartline;
> 	int oldrestartline;
> 	int numaxis;
> 	int activeAxis;	
> 	int numcoords;	
> 	int axnum;
> 	QList<int> maxJogSpeedAxis;
> 	int defaultJogSpeed;
> 	int maxJogSpeed;
> 	double jogSpeed;
> 	double toolsetting;
> 	double tooloffsetsetting;
> 	double jogIncrement;
> 	double linjogincr;
> 	double oldlinjogincr;
> 	double oldrotjogincr;
> 	double rotjogincr;
> 	double coordsys;
> 	EMC_TASK_MODE_ENUM mode;
> };
> 
> #endif
> 

--
 [ signature omitted ] 

Message 11 in thread

Hi
yes, I did include qt4 lib and includes
My Submakefile is like this:
NEOPEN_CC            = gcc
NEOPEN_CXX           = g++
DEFINES       = -DQT_GUI_LIB -DQT_CORE_LIB
NEOPEN_CFLAGS        = -pipe -g -Wall -W -D_REENTRANT  $(DEFINES)
NEOPEN_CXXFLAGS      = -pipe -g -Wall -W -D_REENTRANT  $(DEFINES)
INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I.
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
-Ieditor -I. -I. -Ilibnml/rcs/ -Iemc/nml_intf/ -Ilibnml/nml/
-Ilibnml/inifile/ -Ilibnml/os_intf/ -Ilibnml/posemath/ -Ilibnml/linklist/
-Ilibnml/cms/ -Ilibnml/buffer/ -Iemc/usr_intf/ -Iemc/rs274ngc/
NEOPEN_LIBS = $(SUBLIBS)  -L/usr/lib -lQtGui_debug -lQtCore_debug -lpthread
emc/usr_intf/moc_mainwindow.cc: emc/usr_intf/mainwindow.h \
        emc/usr_intf/ui_mainwindow.h \
        libnml/rcs/rcs.hh \
        libnml/rcs/rcs_print.hh \
        libnml/rcs/rcs_exit.hh \
        libnml/rcs/rcsversion.h \
        libnml/posemath/posemath.h \
        emc/nml_intf/emc.hh \
        emc/nml_intf/canon.hh \
        emc/nml_intf/emcglb.h \
        emc/nml_intf/emcpos.h \
        libnml/nml/nml.hh \
        emc/nml_intf/emccfg.h \
        libnml/inifile/inifile.hh \
        libnml/nml/nml_oi.hh \
        libnml/nml/nmlmsg.hh \
        libnml/os_intf/timer.hh \
        libnml/os_intf/sem.hh \
        libnml/os_intf/_sem.h \
        emc/usr_intf/shcom.hh \
        /usr/bin/moc-qt4
    /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) $< -o $@
emc/usr_intf/moc_editor.cc: emc/usr_intf/editor.h \
        /usr/bin/moc-qt4
    /usr/bin/moc-q4 $(DEFINES) $(INCPATH) $< -o $@
NEOPENSRC := emc/usr_intf/mainwindow.cc \
        emc/usr_intf/moc_mainwindow.cc \
        emc/usr_intf/editor.cc \
        emc/usr_intf/moc_editor.cc \
        emc/usr_intf/main.cc \
        libnml/rcs/rcs_print.cc \
        libnml/rcs/rcs_exit.cc \
        libnml/posemath/posemath.cc \
        emc/nml_intf/emc.cc \
        libnml/nml/nml.cc \
        libnml/inifile/inifile.cc \
        libnml/nml/nml_oi.cc \
        libnml/nml/nmlmsg.cc \
        libnml/os_intf/timer.cc \
        libnml/os_intf/sem.cc \
        emc/usr_intf/shcom.cc
NEOPENOBJ := emc/usr_intf/mainwindow.o \
        emc/usr_intf/moc_mainwindow.o \
        emc/usr_intf/editor.o \
        emc/usr_intf/moc_editor.o \
        emc/usr_intf/main.o \
        emc/usr_intf/rcs_print.o \
        emc/usr_intf/rcs_exit.o \
        emc/usr_intf/posemath.o \
        emc/usr_intf/emc.o \
        emc/usr_intf/nml.o \
        emc/usr_intf/inifile.o \
        emc/usr_intf/nml_oi.o \
        emc/usr_intf/nmlmsg.o \
        emc/usr_intf/timer.o \
        emc/usr_intf/sem.o \
        emc/usr_intf/shcom.o
###### Implicit rules
.SUFFIXES: .c .o .cpp .cc .cxx .C

.cpp.o:
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
    $(NEOPEN_CC) -c $(NEOPEN_CFLAGS) $(INCPATH) -o $@ $<

emc/usr_intf/rcs_print.o: libnml/rcs/rcs_print.cc \
libnml/rcs/rcs_print.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/rcs_exit.o: libnml/rcs/rcs_exit.cc \
        libnml/rcs/rcs_exit.hh \
        libnml/rcs/rcs_print.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/posemath.o: libnml/posemath/posemath.cc \
libnml/posemath/posemath.h
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/emc.o: emc/nml_intf/emc.cc \
        emc/nml_intf/canon.hh \
        emc/nml_intf/emc.hh \
        emc/nml_intf/emcglb.h \
        emc/nml_intf/emcpos.h
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/nml.o: libnml/nml/nml.cc \
        libnml/nml/nml.hh \
        libnml/nml/nmlmsg.hh \
        libnml/nml/nml_srv.hh \
        libnml/nml/nmldiag.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/inifile.o: libnml/inifile/inifile.cc \
libnml/inifile/inifile.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/nml_oi.o: libnml/nml/nml_oi.cc \
        libnml/nml/nml_oi.hh \
        libnml/nml/nml.hh \
        libnml/nml/nmlmsg.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/nmlmsg.o: libnml/nml/nmlmsg.cc \
        libnml/nml/nmlmsg.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/timer.o: libnml/os_intf/timer.cc \
        libnml/os_intf/timer.hh \
        libnml/os_intf/sem.hh \
        libnml/os_intf/_sem.h \
        libnml/os_intf/_timer.h
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/sem.o: libnml/os_intf/sem.cc \
        libnml/os_intf/_sem.h \
        libnml/os_intf/sem.hh \
        libnml/os_intf/timer.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/main.o: emc/usr_intf/main.cc \
        emc/usr_intf/mainwindow.h \
        emc/usr_intf/ui_mainwindow.h \
        libnml/rcs/rcs.hh \
        libnml/rcs/rcs_print.hh \
        libnml/rcs/rcs_exit.hh \
        libnml/rcs/rcsversion.h \
        libnml/posemath/posemath.h \
        emc/nml_intf/emc.hh \
        emc/nml_intf/canon.hh \
        emc/nml_intf/emcglb.h \
        emc/nml_intf/emcpos.h \
        libnml/nml/nml.hh \
        emc/nml_intf/emccfg.h \
        libnml/inifile/inifile.hh \
        libnml/nml/nml_oi.hh \
        libnml/nml/nmlmsg.hh \
        libnml/os_intf/timer.hh \
        libnml/os_intf/sem.hh \
        libnml/os_intf/_sem.h \
        emc/usr_intf/shcom.hh
emc/usr_intf/mainwindow.o: emc/usr_intf/mainwindow.cc \
        emc/usr_intf/mainwindow.h \
        emc/usr_intf/ui_mainwindow.h \
        libnml/rcs/rcs.hh \
        libnml/rcs/rcs_print.hh \
        libnml/rcs/rcs_exit.hh \
        libnml/rcs/rcsversion.h \
        libnml/posemath/posemath.h \
        emc/nml_intf/emc.hh \
        emc/nml_intf/canon.hh \
        emc/nml_intf/emcglb.h \
        emc/nml_intf/emcpos.h \
        libnml/nml/nml.hh \
        emc/nml_intf/emccfg.h \
        libnml/inifile/inifile.hh \
        libnml/nml/nml_oi.hh \
        libnml/nml/nmlmsg.hh \
        libnml/os_intf/timer.hh \
        libnml/os_intf/sem.hh \
        libnml/os_intf/_sem.h \
        emc/usr_intf/shcom.hh
emc/usr_intf/moc_mainwindow.o: emc/usr_intf/moc_mainwindow.cc
emc/usr_intf/editor.o: emc/usr_intf/editor.cc \
        emc/usr_intf/editor.h
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
emc/usr_intf/moc_editor.o: emc/usr_intf/moc_editor.cc
ecm/usr_intf/shcom.o: emc/usr_intf/shcom.cc \
        emc/usr_intf/shcom.hh
    $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<

../bin/neopen: $(NEOPENOBJ) ../lib/libemc.a ../lib/libnml.so
    $(ECHO) Linking $(notdir $@)
    $(CXX) $(LDFLAGS) $(INCPATH) -o $@ $^ $(NEOPEN_LIBS)
TARGETS += ../bin/neopen

2007/5/20, Niu Kun <haoniukun@xxxxxxxxx>:
>
> Well, how is your makefile?
> Have you add Qt in your include path?
> /usr/include/qt4/QtGui
> or
> /usr/include/qt4/Qt
> ?
>
> ååä åé:
> > Hi,
> > I have upload the mainwindow.h which is in the accessory.
> > Regards
> > Fengli
> >
> > 2007/5/20, ååä <zhangfenglisdu@xxxxxxxxx
> > <mailto:zhangfenglisdu@xxxxxxxxx>>:
> >
> >     Hi,once again
> >     But I have had a test by using a small program--hello qt, and I
> >     could compile it and like it with the other parts of my cnc project
> >     without any error. Also, I could execute it successfully. What does
> >     this mean? The makefile I wrote has no errors and I could make use
> >     of "make" tool. But still, my GUI codes couldn't be compiled
> >     through. The same error as that I have posted last mail.
> >     Regards
> >     Fengli
> >
> >
> >     19 May 2007 19:02:00 -0700, Scott Aron Bloom < scott@xxxxxxxxxxxx
> >     <mailto:scott@xxxxxxxxxxxx>>:
> >
> >         there is no reason why you can't use qmake on non qt code...
> >
> >         However, if you really want to use a custom make for non-qt
> >         cpde..  I recommend, you put the qt code in its own lib or
> >         libs... And just link it in with your custom make... Your make
> >         can even call qmake
> >
> >         --Scott
> >         -----Original Message-----
> >         From: "=?GB2312?B?1cW378D2?=" <zhangfenglisdu@xxxxxxxxx
> >         <mailto:zhangfenglisdu@xxxxxxxxx>>
> >         Date: Saturday, May 19, 2007 6:36 pm
> >         Subject: compile error
> >         To: qt-interest <qt-interest@xxxxxxxxxxxxx
> >         <mailto:qt-interest@xxxxxxxxxxxxx>>
> >
> >         Hi, all
> >         >I am using qt4.
> >         >I have made  a  GUI for a milling CNC by qt4. And I have
> compile
> >         it and link it with other parts (be written in c and c++
> >         languages)of my CNC project, so I write makefile by myself not
> >         by qmake. Then when I make it in a shell terminal on ubuntu ,a
> >         few errors occure which I could't understand at all, because the
> >         errors seems to be qt4's errors:
> >         >
> >         >/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro
> 'toLine'
> >         requires 2 arguments, but only 1 given
> >         >In file included from /usr/include/qt4/QtCore/QtCore:61,
> >         >                 from /usr/include/qt4/QtGui/QtGui:1,
> >         >                 from emc/usr_intf/mainwindow.h:24,
> >         >                 from emc/usr_intf/mainwindow.cc:1:
> >         >/usr/include/qt4/QtCore/qline.h:191:18: error: macro 'toLine'
> >         requires 2 arguments, but only 1 given
> >         >/usr/include/qt4/QtCore/qline.h:287:29: error: macro 'toLine'
> >         requires 2 arguments, but only 1 given
> >         >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ  field 'toLine'
> >         has incompleteness type.
> >         >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ expected ';'
> >         before 'const'
> >         >/usr/include/qt4/QtCore/qline.h:191: errorÂÂ expected ';'
> before
> >         'const'
> >         >/usr/include/qt4/QtCore/qline.h:287: errorÂÂ expected
> >         initializer before 'const'
> >         >make: *** [emc/usr_intf/mainwindow.o] error 1
> >         >
> >         >Has anyone experience this problems?
> >         >Thank you
> >         >Regards
> >         >Fengli
> >         >
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > #ifndef MAINWINDOW_H
> > #define MAINWINDOW_H
> >
> > #include <stdio.h>
> > #include <string.h>
> > #include <stdlib.h>
> > #include <signal.h>
> > #include <unistd.h>
> > #include <ctype.h>
> > #include <math.h>
> > #include <sys/types.h>
> >
> > #include "rcs.hh"
> > #include "posemath.h" // PM_POSE, TO_RAD
> > #include "emc.hh"     // EMC NML
> > #include "nml.hh"
> > #include "canon.hh"   // CANON_UNITS, CANON_UNITS_INCHES,MM,CM
> > #include "emcglb.h"   // EMC_NMLFILE, TRAJ_MAX_VELOCITY, etc.
> > #include "emccfg.h"   // DEFAULT_TRAJ_MAX_VELOCITY
> > #include "inifile.hh" // INIFILE
> > #include "nml_oi.hh"    // nmlErrorFormat, NML_ERROR, etc
> > #include "rcs_print.hh"
> > #include "timer.hh"     // esleep
> > #include <QtGui>
> > #include <QtCore>
> > #include "ui_mainwindow.h"
> > #include "editor.h"
> > #include "shcom.hh"
> >
> > class MainWindow : public QMainWindow, public Ui::MainWindow
> > {
> >       Q_OBJECT
> > public:
> >       MainWindow();
> > protected:
> >       void closeEvent(QCloseEvent *event);
> >       void paintEvent(QPaintEvent *event);
> > private slots:
> >       void quit();
> >       void taskPlanInit();
> >       void clickXYPushButton();
> >       void clickXZPushButton();
> >       void clickYZPushButton();
> >       void click3DPushButton();
> >       void redraw(QPainter p);
> >       void togglePlotSetup();
> >       void showPositionType(bool checked);
> >       void showToolInfo(bool checked);
> >       void showOffsetInfo(bool checked);
> >       void showRestart();
> >       void hideRestart();
> >       void toggleCmdAct();
> >       void toggleRelAbs();
> >       void showProgramFile();
> >       void showEditorFile();
> >       void showParameterFile();
> >       void showToolFile();
> >       void showActiveGCodes();
> >       void updateGui();
> >       void toggleMdi(bool checked);
> >       void toggleAuto(bool checked);
> >       void toggleManual(bool checked);
> >       void toggleEstop();
> >       void toggleAbort(bool checked);
> >       void toggleFeedhold();
> >       void popInPlot(bool checked);
> >       void popInEditor(bool checked);
> >       //void popInOffsets(bool checked);
> >       void popInTools(bool checked);
> >       void sendmdi();
> >       void clickDefault();
> >       void clickRapid();
> >       void clickIncrement();
> >       void clickContinuous();
> >       void setAllZero();
> >       void setZero();
> >       void jogMinus();
> >       void jogStop();
> >       void jogPlus();
> >       void spindleForward();
> >       void spindleReverse();
> >       void spindleOff();
> >       void pressSpindleSlower();
> >       void releaseSpindleSlower();
> >       void pressSpindleFaster();
> >       void releaseSpindleFaster();
> >       void toggleBrake(bool checked);
> >       void toggleMist(bool checked);
> >       void toggleFlood(bool checked);
> >       void fileDialog();
> >       void run();
> >       void pause();
> >       void resume();
> >       void step();
> >       void verify();
> >       void back();
> >       void ahead();
> >       void restart();
> >       void addTool();
> >       void removeTool();
> >       bool updateToolfile();
> >       void tempSlot();
> >       void axisSelectx(int axis);
> > signals:
> >       void tempSignal(int axis);
> > private:
> >       void iniVar();
> >       void createMenubar();
> >       void createToolbar();
> >       void createLeftWidgets();
> >       void readSettings();
> >       void writeSettings();
> >       double vector(double x, double y, double z,double a, double b,
> double c);
> >       void threeDView(QPainter p);
> >       void updatePlot(QPainter p);
> >       double relcmdpos(int axis);
> >       double relactpos(int axis);
> >       double abscmdpos(int axis);
> >       double absactpos(int axis);
> >       QString getProgramStatus();
> >       QString getProgramCodeString();
> >       bool loadToolText();
> >       void loadProgramText(QString programnamestring);
> >       void loadProgram(QString programnamestring);
> >       void changeProgram();
> >       void jogNeg( int axis);
> >       void jogPos(int axis);
> >       void findVarNumbers(double);
> >       void findVarValues();
> >       int iniLoad(QString filename);
> >
> >       int xdir;
> >       int ydir;
> >       int zdir;
> >       int adir;
> >       int bdir;
> >       int cdir;
> >       int size;
> >       double xlast;
> >       double xnext;
> >       double ylast;
> >       double ynext;
> >       double zlast;
> >       double znext;
> >       double X;
> >       double Y;
> >       double Z;
> >       double A;
> >       double B;
> >       double C;
> >       int zoom;
> >       double Xlast;
> >       double Ylast;
> >       double Zlast;
> >       double Alast;
> >       double Blast;
> >       double Clast;
> >       double Glast;
> >       QList<double> threed_plot;
> >       double a_plot;
> >       double b_plot;
> >       double c_plot;
> >       double delta_Alast;
> >       double delta_Blast;
> >       double delta_Clast;
> >       int plotSetup;
> >
> >       QTimer *timer;
> >       Editor *editor;
> >       QString unitsetting;
> >       QString oldunitsetting;
> >       QString modeInDisplay;
> >       QString oldmode;
> >       QString jointworld;
> >       QString lastjointworld;
> >       int displayCycleTime;
> >       QString coords;
> >       QString actcmd;
> >       int maxFeedOverride;
> >       QString programDirectory;
> >       QString lastactcmd;
> >       QString lastcoords;
> >       QString programcodestring;
> >       QString feedvalue;
> >       QString paramfilename;
> >       QString PARAMETER_FILE;
> >       QString toolfilename;
> >       QString TOOL_TABLE_FILE;
> >       QString editFilename;
> >       QString programnamestring;
> >       QString programstatusstring;
> >       QString oldstatusstring;
> >       QString programin;
> >       QString jogType;
> >       QStringList offsetsetting;
> >       QString offsetsettingstr;
> >       QStringList worldlabel;
> >       QStringList worldlabellist;
> >       QStringList poslabel;
> >       QStringList axisType;
> >       QStringList coordnames;
> >       QList<double> val;
> >       QList<double> oval;
> >       QList<double> num;
> >       QList<int> axiscoordmap;
> >       QList<int> jointlabel;
> >       QList<double> posdigit;
> >       QString axname;
> >       int emc_teleop_enable_command_given;
> >       int feedoverride;
> >       int lastfeedoverride;
> >       int toolnum;
> >       int columnCount;
> >       int rowCount;
> >       int activeLine;
> >       int programStartLine;
> >       int runMark;
> >       int restartline;
> >       int oldrestartline;
> >       int numaxis;
> >       int activeAxis;
> >       int numcoords;
> >       int axnum;
> >       QList<int> maxJogSpeedAxis;
> >       int defaultJogSpeed;
> >       int maxJogSpeed;
> >       double jogSpeed;
> >       double toolsetting;
> >       double tooloffsetsetting;
> >       double jogIncrement;
> >       double linjogincr;
> >       double oldlinjogincr;
> >       double oldrotjogincr;
> >       double rotjogincr;
> >       double coordsys;
> >       EMC_TASK_MODE_ENUM mode;
> > };
> >
> > #endif
> >
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

Message 12 in thread

Hi,
Thank you for your favor.
I know the reason for error, that is, there is really a defined macro
named  toLine in postmath.h and posemath.cc files. Now I have fix the bug.
Thank you again.
Best wishes.
Fengli


2007/5/20, ååä <zhangfenglisdu@xxxxxxxxx>:
>
> Hi
> yes, I did include qt4 lib and includes
> My Submakefile is like this:
> NEOPEN_CC            = gcc
> NEOPEN_CXX           = g++
> DEFINES       = -DQT_GUI_LIB -DQT_CORE_LIB
> NEOPEN_CFLAGS        = -pipe -g -Wall -W -D_REENTRANT  $(DEFINES)
> NEOPEN_CXXFLAGS      = -pipe -g -Wall -W -D_REENTRANT  $(DEFINES)
> INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I.
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
> -Ieditor -I. -I. -Ilibnml/rcs/ -Iemc/nml_intf/ -Ilibnml/nml/
> -Ilibnml/inifile/ -Ilibnml/os_intf/ -Ilibnml/posemath/ -Ilibnml/linklist/
> -Ilibnml/cms/ -Ilibnml/buffer/ -Iemc/usr_intf/ -Iemc/rs274ngc/
> NEOPEN_LIBS = $(SUBLIBS)  -L/usr/lib -lQtGui_debug -lQtCore_debug
> -lpthread
> emc/usr_intf/moc_mainwindow.cc: emc/usr_intf/mainwindow.h \
>         emc/usr_intf/ui_mainwindow.h \
>         libnml/rcs/rcs.hh \
>         libnml/rcs/rcs_print.hh \
>         libnml/rcs/rcs_exit.hh \
>         libnml/rcs/rcsversion.h \
>         libnml/posemath/posemath.h \
>         emc/nml_intf/emc.hh \
>         emc/nml_intf/canon.hh \
>         emc/nml_intf/emcglb.h \
>         emc/nml_intf/emcpos.h \
>         libnml/nml/nml.hh \
>         emc/nml_intf/emccfg.h \
>         libnml/inifile/inifile.hh \
>         libnml/nml/nml_oi.hh \
>         libnml/nml/nmlmsg.hh \
>         libnml/os_intf/timer.hh \
>         libnml/os_intf/sem.hh \
>         libnml/os_intf/_sem.h \
>         emc/usr_intf/shcom.hh \
>         /usr/bin/moc-qt4
>     /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) $< -o $@
> emc/usr_intf/moc_editor.cc: emc/usr_intf/editor.h \
>         /usr/bin/moc-qt4
>     /usr/bin/moc-q4 $(DEFINES) $(INCPATH) $< -o $@
> NEOPENSRC := emc/usr_intf/mainwindow.cc \
>         emc/usr_intf/moc_mainwindow.cc \
>         emc/usr_intf/editor.cc \
>         emc/usr_intf/moc_editor.cc \
>         emc/usr_intf/main.cc \
>         libnml/rcs/rcs_print.cc \
>         libnml/rcs/rcs_exit.cc \
>         libnml/posemath/posemath.cc \
>         emc/nml_intf/emc.cc \
>         libnml/nml/nml.cc \
>         libnml/inifile/inifile.cc \
>         libnml/nml/nml_oi.cc \
>         libnml/nml/nmlmsg.cc \
>         libnml/os_intf/timer.cc \
>         libnml/os_intf/sem.cc \
>         emc/usr_intf/shcom.cc
> NEOPENOBJ := emc/usr_intf/mainwindow.o \
>         emc/usr_intf/moc_mainwindow.o \
>         emc/usr_intf/editor.o \
>         emc/usr_intf/moc_editor.o \
>         emc/usr_intf/main.o \
>         emc/usr_intf/rcs_print.o \
>         emc/usr_intf/rcs_exit.o \
>         emc/usr_intf/posemath.o \
>         emc/usr_intf/emc.o \
>         emc/usr_intf/nml.o \
>         emc/usr_intf/inifile.o \
>         emc/usr_intf/nml_oi.o \
>         emc/usr_intf/nmlmsg.o \
>         emc/usr_intf/timer.o \
>         emc/usr_intf/sem.o \
>         emc/usr_intf/shcom.o
> ###### Implicit rules
> .SUFFIXES: .c .o .cpp .cc .cxx .C
>
> .cpp.o:
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
>
> .cc.o:
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
>
> .cxx.o:
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
>
> .C.o:
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
>
> .c.o:
>     $(NEOPEN_CC) -c $(NEOPEN_CFLAGS) $(INCPATH) -o $@ $<
>
> emc/usr_intf/rcs_print.o: libnml/rcs/rcs_print.cc \
> libnml/rcs/rcs_print.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/rcs_exit.o: libnml/rcs/rcs_exit.cc \
>         libnml/rcs/rcs_exit.hh \
>         libnml/rcs/rcs_print.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/posemath.o: libnml/posemath/posemath.cc \
> libnml/posemath/posemath.h
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/emc.o: emc/nml_intf/emc.cc \
>         emc/nml_intf/canon.hh \
>         emc/nml_intf/emc.hh \
>         emc/nml_intf/emcglb.h \
>         emc/nml_intf/emcpos.h
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/nml.o: libnml/nml/nml.cc \
>         libnml/nml/nml.hh \
>         libnml/nml/nmlmsg.hh \
>         libnml/nml/nml_srv.hh \
>         libnml/nml/nmldiag.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/inifile.o: libnml/inifile/inifile.cc \
> libnml/inifile/inifile.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/nml_oi.o: libnml/nml/nml_oi.cc \
>         libnml/nml/nml_oi.hh \
>         libnml/nml/nml.hh \
>         libnml/nml/nmlmsg.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/nmlmsg.o: libnml/nml/nmlmsg.cc \
>         libnml/nml/nmlmsg.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/timer.o: libnml/os_intf/timer.cc \
>         libnml/os_intf/timer.hh \
>         libnml/os_intf/sem.hh \
>         libnml/os_intf/_sem.h \
>         libnml/os_intf/_timer.h
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/sem.o: libnml/os_intf/sem.cc \
>         libnml/os_intf/_sem.h \
>         libnml/os_intf/sem.hh \
>         libnml/os_intf/timer.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/main.o: emc/usr_intf/main.cc \
>         emc/usr_intf/mainwindow.h \
>         emc/usr_intf/ui_mainwindow.h \
>         libnml/rcs/rcs.hh \
>         libnml/rcs/rcs_print.hh \
>         libnml/rcs/rcs_exit.hh \
>         libnml/rcs/rcsversion.h \
>         libnml/posemath/posemath.h \
>         emc/nml_intf/emc.hh \
>         emc/nml_intf/canon.hh \
>         emc/nml_intf/emcglb.h \
>         emc/nml_intf/emcpos.h \
>         libnml/nml/nml.hh \
>         emc/nml_intf/emccfg.h \
>         libnml/inifile/inifile.hh \
>         libnml/nml/nml_oi.hh \
>         libnml/nml/nmlmsg.hh \
>         libnml/os_intf/timer.hh \
>         libnml/os_intf/sem.hh \
>         libnml/os_intf/_sem.h \
>         emc/usr_intf/shcom.hh
> emc/usr_intf/mainwindow.o: emc/usr_intf/mainwindow.cc \
>         emc/usr_intf/mainwindow.h \
>         emc/usr_intf/ui_mainwindow.h \
>         libnml/rcs/rcs.hh \
>         libnml/rcs/rcs_print.hh \
>         libnml/rcs/rcs_exit.hh \
>         libnml/rcs/rcsversion.h \
>         libnml/posemath/posemath.h \
>         emc/nml_intf/emc.hh \
>         emc/nml_intf/canon.hh \
>         emc/nml_intf/emcglb.h \
>         emc/nml_intf/emcpos.h \
>         libnml/nml/nml.hh \
>         emc/nml_intf/emccfg.h \
>         libnml/inifile/inifile.hh \
>         libnml/nml/nml_oi.hh \
>         libnml/nml/nmlmsg.hh \
>         libnml/os_intf/timer.hh \
>         libnml/os_intf/sem.hh \
>         libnml/os_intf/_sem.h \
>         emc/usr_intf/shcom.hh
> emc/usr_intf/moc_mainwindow.o: emc/usr_intf/moc_mainwindow.cc
> emc/usr_intf/editor.o: emc/usr_intf/editor.cc \
>         emc/usr_intf/editor.h
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
> emc/usr_intf/moc_editor.o: emc/usr_intf/moc_editor.cc
> ecm/usr_intf/shcom.o: emc/usr_intf/shcom.cc \
>         emc/usr_intf/shcom.hh
>     $(NEOPEN_CXX) -c $(NEOPEN_CXXFLAGS) $(INCPATH) -o $@ $<
>
> ../bin/neopen: $(NEOPENOBJ) ../lib/libemc.a ../lib/libnml.so
>     $(ECHO) Linking $(notdir $@)
>     $(CXX) $(LDFLAGS) $(INCPATH) -o $@ $^ $(NEOPEN_LIBS)
> TARGETS += ../bin/neopen
>
> 2007/5/20, Niu Kun <haoniukun@xxxxxxxxx >:
> >
> > Well, how is your makefile?
> > Have you add Qt in your include path?
> > /usr/include/qt4/QtGui
> > or
> > /usr/include/qt4/Qt
> > ?
> >
> > ååä åé:
> > > Hi,
> > > I have upload the mainwindow.h which is in the accessory.
> > > Regards
> > > Fengli
> > >
> > > 2007/5/20, ååä < zhangfenglisdu@xxxxxxxxx
> > > <mailto:zhangfenglisdu@xxxxxxxxx>>:
> > >
> > >     Hi,once again
> > >     But I have had a test by using a small program--hello qt, and I
> > >     could compile it and like it with the other parts of my cnc
> > project
> > >     without any error. Also, I could execute it successfully. What
> > does
> > >     this mean? The makefile I wrote has no errors and I could make use
> >
> > >     of "make" tool. But still, my GUI codes couldn't be compiled
> > >     through. The same error as that I have posted last mail.
> > >     Regards
> > >     Fengli
> > >
> > >
> > >     19 May 2007 19:02:00 -0700, Scott Aron Bloom < scott@xxxxxxxxxxxx
> > >     <mailto:scott@xxxxxxxxxxxx>>:
> > >
> > >         there is no reason why you can't use qmake on non qt code...
> > >
> > >         However, if you really want to use a custom make for non-qt
> > >         cpde..  I recommend, you put the qt code in its own lib or
> > >         libs... And just link it in with your custom make... Your make
> >
> > >         can even call qmake
> > >
> > >         --Scott
> > >         -----Original Message-----
> > >         From: "=?GB2312?B?1cW378D2?=" <zhangfenglisdu@xxxxxxxxx
> > >         <mailto:zhangfenglisdu@xxxxxxxxx>>
> > >         Date: Saturday, May 19, 2007 6:36 pm
> > >         Subject: compile error
> > >         To: qt-interest < qt-interest@xxxxxxxxxxxxx
> > >         <mailto:qt-interest@xxxxxxxxxxxxx>>
> > >
> > >         Hi, all
> > >         >I am using qt4.
> > >         >I have made  a  GUI for a milling CNC by qt4. And I have
> > compile
> > >         it and link it with other parts (be written in c and c++
> > >         languages)of my CNC project, so I write makefile by myself not
> >
> > >         by qmake. Then when I make it in a shell terminal on ubuntu ,a
> > >         few errors occure which I could't understand at all, because
> > the
> > >         errors seems to be qt4's errors:
> > >         >
> > >         >/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro
> > 'toLine'
> > >         requires 2 arguments, but only 1 given
> > >         >In file included from /usr/include/qt4/QtCore/QtCore:61,
> > >         >                 from /usr/include/qt4/QtGui/QtGui:1,
> > >         >                 from emc/usr_intf/mainwindow.h:24,
> > >         >                 from emc/usr_intf/mainwindow.cc:1:
> > >         >/usr/include/qt4/QtCore/qline.h:191:18: error: macro 'toLine'
> > >         requires 2 arguments, but only 1 given
> > >         >/usr/include/qt4/QtCore/qline.h:287:29: error: macro 'toLine'
> >
> > >         requires 2 arguments, but only 1 given
> > >         >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ  field
> > 'toLine'
> > >         has incompleteness type.
> > >         >/usr/include/qt4/QtCore/qvariant.h:226: errorÂÂ expected ';'
> > >         before 'const'
> > >         >/usr/include/qt4/QtCore/qline.h:191: errorÂÂ expected ';'
> > before
> > >         'const'
> > >         >/usr/include/qt4/QtCore/qline.h:287: errorÂÂ expected
> > >         initializer before 'const'
> > >         >make: *** [emc/usr_intf/mainwindow.o] error 1
> > >         >
> > >         >Has anyone experience this problems?
> > >         >Thank you
> > >         >Regards
> > >         >Fengli
> > >         >
> > >
> > >
> > >
> > >
> > >
> > ------------------------------------------------------------------------
> > >
> > > #ifndef MAINWINDOW_H
> > > #define MAINWINDOW_H
> > >
> > > #include <stdio.h>
> > > #include <string.h>
> > > #include <stdlib.h>
> > > #include <signal.h>
> > > #include <unistd.h>
> > > #include < ctype.h>
> > > #include <math.h>
> > > #include <sys/types.h>
> > >
> > > #include "rcs.hh"
> > > #include "posemath.h" // PM_POSE, TO_RAD
> > > #include "emc.hh"     // EMC NML
> > > #include "nml.hh"
> > > #include "canon.hh"   // CANON_UNITS, CANON_UNITS_INCHES,MM,CM
> > > #include "emcglb.h"   // EMC_NMLFILE, TRAJ_MAX_VELOCITY, etc.
> > > #include " emccfg.h"   // DEFAULT_TRAJ_MAX_VELOCITY
> > > #include "inifile.hh" // INIFILE
> > > #include "nml_oi.hh"    // nmlErrorFormat, NML_ERROR, etc
> > > #include "rcs_print.hh"
> > > #include " timer.hh"     // esleep
> > > #include <QtGui>
> > > #include <QtCore>
> > > #include "ui_mainwindow.h"
> > > #include "editor.h"
> > > #include "shcom.hh"
> > >
> > > class MainWindow : public QMainWindow, public Ui::MainWindow
> > > {
> > >       Q_OBJECT
> > > public:
> > >       MainWindow();
> > > protected:
> > >       void closeEvent(QCloseEvent *event);
> > >       void paintEvent(QPaintEvent *event);
> > > private slots:
> > >       void quit();
> > >       void taskPlanInit();
> > >       void clickXYPushButton();
> > >       void clickXZPushButton();
> > >       void clickYZPushButton();
> > >       void click3DPushButton();
> > >       void redraw(QPainter p);
> > >       void togglePlotSetup();
> > >       void showPositionType(bool checked);
> > >       void showToolInfo(bool checked);
> > >       void showOffsetInfo(bool checked);
> > >       void showRestart();
> > >       void hideRestart();
> > >       void toggleCmdAct();
> > >       void toggleRelAbs();
> > >       void showProgramFile();
> > >       void showEditorFile();
> > >       void showParameterFile();
> > >       void showToolFile();
> > >       void showActiveGCodes();
> > >       void updateGui();
> > >       void toggleMdi(bool checked);
> > >       void toggleAuto(bool checked);
> > >       void toggleManual(bool checked);
> > >       void toggleEstop();
> > >       void toggleAbort(bool checked);
> > >       void toggleFeedhold();
> > >       void popInPlot(bool checked);
> > >       void popInEditor(bool checked);
> > >       //void popInOffsets(bool checked);
> > >       void popInTools(bool checked);
> > >       void sendmdi();
> > >       void clickDefault();
> > >       void clickRapid();
> > >       void clickIncrement();
> > >       void clickContinuous();
> > >       void setAllZero();
> > >       void setZero();
> > >       void jogMinus();
> > >       void jogStop();
> > >       void jogPlus();
> > >       void spindleForward();
> > >       void spindleReverse();
> > >       void spindleOff();
> > >       void pressSpindleSlower();
> > >       void releaseSpindleSlower();
> > >       void pressSpindleFaster();
> > >       void releaseSpindleFaster();
> > >       void toggleBrake(bool checked);
> > >       void toggleMist(bool checked);
> > >       void toggleFlood(bool checked);
> > >       void fileDialog();
> > >       void run();
> > >       void pause();
> > >       void resume();
> > >       void step();
> > >       void verify();
> > >       void back();
> > >       void ahead();
> > >       void restart();
> > >       void addTool();
> > >       void removeTool();
> > >       bool updateToolfile();
> > >       void tempSlot();
> > >       void axisSelectx(int axis);
> > > signals:
> > >       void tempSignal(int axis);
> > > private:
> > >       void iniVar();
> > >       void createMenubar();
> > >       void createToolbar();
> > >       void createLeftWidgets();
> > >       void readSettings();
> > >       void writeSettings();
> > >       double vector(double x, double y, double z,double a, double b,
> > double c);
> > >       void threeDView(QPainter p);
> > >       void updatePlot(QPainter p);
> > >       double relcmdpos(int axis);
> > >       double relactpos(int axis);
> > >       double abscmdpos(int axis);
> > >       double absactpos(int axis);
> > >       QString getProgramStatus();
> > >       QString getProgramCodeString();
> > >       bool loadToolText();
> > >       void loadProgramText(QString programnamestring);
> > >       void loadProgram(QString programnamestring);
> > >       void changeProgram();
> > >       void jogNeg( int axis);
> > >       void jogPos(int axis);
> > >       void findVarNumbers(double);
> > >       void findVarValues();
> > >       int iniLoad(QString filename);
> > >
> > >       int xdir;
> > >       int ydir;
> > >       int zdir;
> > >       int adir;
> > >       int bdir;
> > >       int cdir;
> > >       int size;
> > >       double xlast;
> > >       double xnext;
> > >       double ylast;
> > >       double ynext;
> > >       double zlast;
> > >       double znext;
> > >       double X;
> > >       double Y;
> > >       double Z;
> > >       double A;
> > >       double B;
> > >       double C;
> > >       int zoom;
> > >       double Xlast;
> > >       double Ylast;
> > >       double Zlast;
> > >       double Alast;
> > >       double Blast;
> > >       double Clast;
> > >       double Glast;
> > >       QList<double> threed_plot;
> > >       double a_plot;
> > >       double b_plot;
> > >       double c_plot;
> > >       double delta_Alast;
> > >       double delta_Blast;
> > >       double delta_Clast;
> > >       int plotSetup;
> > >
> > >       QTimer *timer;
> > >       Editor *editor;
> > >       QString unitsetting;
> > >       QString oldunitsetting;
> > >       QString modeInDisplay;
> > >       QString oldmode;
> > >       QString jointworld;
> > >       QString lastjointworld;
> > >       int displayCycleTime;
> > >       QString coords;
> > >       QString actcmd;
> > >       int maxFeedOverride;
> > >       QString programDirectory;
> > >       QString lastactcmd;
> > >       QString lastcoords;
> > >       QString programcodestring;
> > >       QString feedvalue;
> > >       QString paramfilename;
> > >       QString PARAMETER_FILE;
> > >       QString toolfilename;
> > >       QString TOOL_TABLE_FILE;
> > >       QString editFilename;
> > >       QString programnamestring;
> > >       QString programstatusstring;
> > >       QString oldstatusstring;
> > >       QString programin;
> > >       QString jogType;
> > >       QStringList offsetsetting;
> > >       QString offsetsettingstr;
> > >       QStringList worldlabel;
> > >       QStringList worldlabellist;
> > >       QStringList poslabel;
> > >       QStringList axisType;
> > >       QStringList coordnames;
> > >       QList<double> val;
> > >       QList<double> oval;
> > >       QList<double> num;
> > >       QList<int> axiscoordmap;
> > >       QList<int> jointlabel;
> > >       QList<double> posdigit;
> > >       QString axname;
> > >       int emc_teleop_enable_command_given;
> > >       int feedoverride;
> > >       int lastfeedoverride;
> > >       int toolnum;
> > >       int columnCount;
> > >       int rowCount;
> > >       int activeLine;
> > >       int programStartLine;
> > >       int runMark;
> > >       int restartline;
> > >       int oldrestartline;
> > >       int numaxis;
> > >       int activeAxis;
> > >       int numcoords;
> > >       int axnum;
> > >       QList<int> maxJogSpeedAxis;
> > >       int defaultJogSpeed;
> > >       int maxJogSpeed;
> > >       double jogSpeed;
> > >       double toolsetting;
> > >       double tooloffsetsetting;
> > >       double jogIncrement;
> > >       double linjogincr;
> > >       double oldlinjogincr;
> > >       double oldrotjogincr;
> > >       double rotjogincr;
> > >       double coordsys;
> > >       EMC_TASK_MODE_ENUM mode;
> > > };
> > >
> > > #endif
> > >
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
> >
> >
>

Message 13 in thread

then your testcase does not represent the problem...

I'm not saying you can't get a makefile to run.. But its usually more trouble then its worth.  
--Scott
-----Original Message-----
From: "=?GB2312?B?1cW378D2?=" <zhangfenglisdu@xxxxxxxxx>
Date: Saturday, May 19, 2007 8:29 pm
Subject: Re: compile error
To: qt-interest <qt-interest@xxxxxxxxxxxxx>

Hi,once again
>But I have had a test by using a small program--hello qt, and I could compile it and like it with the other parts of my cnc project without any error. Also, I could execute it successfully. What does this mean? The makefile I wrote has no errors and I could make use of 'make' tool. But still, my GUI codes couldn ;t be compiled through. The same error as that I have posted last mail.
>Regards
>Fengli
>
>
>
>19 May 2007 19:02:00 -0700, Scott Aron Bloom scott@xxxxxxxxxxxx>: there is no reason why you can ;t use qmake on non qt code...
>
>However, if you really want to use a custom make for non-qt cpde..  I recommend, you put the qt code in its own lib or libs... And just link it in with your custom make... Your make can even call qmake
>
>--Scott
>-----Original Message-----
>From: 'ÕÅ·ïÀö' zhangfenglisdu@xxxxxxxxx>
>Date: Saturday, May 19, 2007 6:36 pm
>Subject: compile error
>To: qt-interest qt-interest@xxxxxxxxxxxxx>
>
>Hi, all
>>I am using qt4.
>>I have made  a  GUI for a milling CNC by qt4. And I have compile it and link it with other parts (be written in c and c++ languages)of my CNC project, so I write makefile by myself not by qmake. Then when I make it in a shell terminal on ubuntu ,a few errors occure which I could ;t understand at all, because the errors seems to be qt4 ;s errors:
>>
>>/usr/include/qt4/QtCore/qvariant.h:226:18: error: macro  ;toLine ; requires 2 arguments, but only 1 given
>>In file included from /usr/include/qt4/QtCore/QtCore:61,
>>                 from /usr/include/qt4/QtGui/QtGui:1,
>>                 from emc/usr_intf/mainwindow.h:24,
>>                 from emc/usr_intf/mainwindow.cc:1:
>>/usr/include/qt4/QtCore/qline.h:191:18: error: macro  ;toLine ; requires 2 arguments, but only 1 given
>>/usr/include/qt4/QtCore/qline.h:287:29: error: macro  ;toLine ; requires 2 arguments, but only 1 given
>>/usr/include/qt4/QtCore/qvariant.h:226: error£º  field  ;toLine ; has incompleteness type.
>>/usr/include/qt4/QtCore/qvariant.h:226: error£º expected  ;; ; before  ;const ;
>>/usr/include/qt4/QtCore/qline.h:191: error£º expected  ;; ; before  ;const ;
>>/usr/include/qt4/QtCore/qline.h:287: error£º expected initializer before  ;const ;
>>make: *** [emc/usr_intf/mainwindow.o] error 1
>>
>>Has anyone experience this problems?
>>Thank you
>>Regards
>>Fen

--
 [ signature omitted ]