mevkurray 24 Newbie Poster

Hi all.

Im developing a qt app to use on a wince device.

I have compiled the OpenSource version of Qt for winCE, and it is working.

My program compiles fine. However, if i have any slots defined in the header file, it throws the following linker error:

moc_updatedialog.obj : error LNK2019: unresolved external symbol "private: void __cdecl UpdateDialog::On_btnSubmitNE_pressed(void)" (?On_btnSubmitNE_pressed@UpdateDialog@@AAAXXZ) referenced in function "public: virtual int __cdecl UpdateDialog::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@UpdateDialog@@UAAHW4Call@QMetaObject@@HPAPAX@Z)

this is the header file which compiles:

#ifndef UPDATEDIALOG_H
#define UPDATEDIALOG_H

#include <QDialog>
#include <QObject>
#include "ui_updatedialog.h"

class UpdateDialog : public QDialog
{
	Q_OBJECT

public:
	UpdateDialog(QWidget *parent = 0);
	~UpdateDialog();

private:
	Ui::UpdateDialogClass ui;

private slots:
	//void On_tbxBatchIDUP_returnPressed();
	//void On_tbxLocationNE_returnPressed();
	//void On_tbxQtyPotsNE_returnPressed();
	//void On_btnSubmitNE_pressed();
	
};

#endif // UPDATEDIALOG_H

however, this does nothing. i have linked to all qt libraries that i am using, and the QtDesigner/QtDesignerComponents, as i made the .ui files in QtDesigner.

here is the code that throws the errors:

#ifndef UPDATEDIALOG_H
#define UPDATEDIALOG_H

#include <QDialog>
#include <QObject>
#include "ui_updatedialog.h"

class UpdateDialog : public QDialog
{
	Q_OBJECT

public:
	UpdateDialog(QWidget *parent = 0);
	~UpdateDialog();

private:
	Ui::UpdateDialogClass ui;

private slots:
	void On_tbxBatchIDUP_returnPressed();
	void On_tbxLocationNE_returnPressed();
	void On_tbxQtyPotsNE_returnPressed();
	void On_btnSubmitNE_pressed();
	
};

#endif // UPDATEDIALOG_H

i assume the problem has something to do with the moc'ing process.

the qt version is 4.5.3

here is the VS build log:

Build Log Build started: Project: barcoderRebuild, Configuration: Debug|STANDARDSDK_500 (ARMV4I)
Command Lines Creating temporary file "c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\BAT0000D331643512.bat" with contents
[
@echo off

"C:\Qt\qt-embedded-wince-opensource-src-4.5.3\bin\moc.exe" -DUNDER_CE -DWINCE -D_WINDOWS -D_UNICODE -DUNICODE -D_WIN32 -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DSTANDARDSHELL_UI_MODEL -D_WIN32_WCE=0x500 -DARMV4I -D_ARMV4I_ -Darmv4i -D_ARM_ -DARM -D_M_ARM -DARM -D__arm__ -DQ_OS_WINCE_STD -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SQL_LIB -I".\GeneratedFiles\." -I"C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\." -I".\GeneratedFiles\Debug\." -I"C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtCore\." -I"C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtGui\." -I"C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtSql\." -I"C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtWebKit\." -I".\." -I".\Patterns\." ".\updatedialog.h" -o ".\GeneratedFiles\Debug\moc_updatedialog.cpp"

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "Moc'ing updatedialog.h..."

exit 1

:VCEnd
]
Creating command line """c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\BAT0000D331643512.bat"""
Creating temporary file "c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\RSP0000D431643512.rsp" with contents
[
/Od /I ".\GeneratedFiles" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include" /I ".\GeneratedFiles\Debug" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtCore" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtGui" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtSql" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtWebKit" /I ".\\" /I "Patterns" /D "UNDER_CE" /D "WINCE" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "_WIN32" /D "QT_NO_PRINTER" /D "QT_NO_PRINTDIALOG" /D "STANDARDSHELL_UI_MODEL" /D "_WIN32_WCE=0x500" /D "ARMV4I" /D "_ARMV4I_" /D "armv4i" /D "_ARM_" /D "ARM" /D "_M_ARM" /D "__arm__" /D "Q_OS_WINCE_STD" /D "QT_THREAD_SUPPORT" /D "QT_CORE_LIB" /D "QT_GUI_LIB" /D "QT_SQL_LIB" /FD /EHsc /MDd /fp:fast /Zc:wchar_t- /GR- /Fo"STANDARDSDK_500 (ARMV4I)\Debug/" /Fd"STANDARDSDK_500 (ARMV4I)\Debug/vc80.pdb" /W3 /c /Zi /TP

".\updatedialog.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\RSP0000D431643512.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\RSP0000D531643512.rsp" with contents
[
/Od /I ".\GeneratedFiles" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include" /I ".\GeneratedFiles\Debug" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtCore" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtGui" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtSql" /I "C:\Qt\qt-embedded-wince-opensource-src-4.5.3\include\QtWebKit" /I ".\\" /I "Patterns" /D "UNDER_CE" /D "WINCE" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "_WIN32" /D "QT_NO_PRINTER" /D "QT_NO_PRINTDIALOG" /D "STANDARDSHELL_UI_MODEL" /D "_WIN32_WCE=0x500" /D "ARMV4I" /D "_ARMV4I_" /D "armv4i" /D "_ARM_" /D "ARM" /D "_M_ARM" /D "__arm__" /D "Q_OS_WINCE_STD" /D "QT_THREAD_SUPPORT" /D "QT_CORE_LIB" /D "QT_GUI_LIB" /D "QT_SQL_LIB" /FD /EHsc /MDd /fp:fast /Zc:wchar_t- /GR- /Fo"STANDARDSDK_500 (ARMV4I)\Debug/" /Fd"STANDARDSDK_500 (ARMV4I)\Debug/vc80.pdb" /W3 /c /Zi /TP

".\GeneratedFiles\Debug\moc_updatedialog.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\RSP0000D531643512.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\RSP0000D631643512.rsp" with contents
[
/OUT:"C:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\Debug\barcoderRebuild.exe" /LIBPATH:"C:\Qt\qt-embedded-wince-opensource-src-4.5.3\lib" /MANIFEST:NO /NODEFAULTLIB:"oldnames.lib" /DEBUG /PDB:"C:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\Debug\barcoderRebuild.pdb" /DYNAMICBASE /NXCOMPAT /MACHINE:THUMB /SUBSYSTEM:WINDOWSCE,5.00 QtDesignerd4.lib QtDesignerComponentsd4.lib qtmaind.lib QtCored4.lib QtGuid4.lib QtSqld4.lib QtWebKitd4.lib coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib

".\STANDARDSDK_500 (ARMV4I)\Debug\main.obj"

".\STANDARDSDK_500 (ARMV4I)\Debug\qbarcoda.obj"

".\STANDARDSDK_500 (ARMV4I)\Debug\moc_qbarcoda.obj"

".\STANDARDSDK_500 (ARMV4I)\Debug\qrc_qbarcoda.obj"

".\STANDARDSDK_500 (ARMV4I)\Debug\newentrydialog.obj"

".\STANDARDSDK_500 (ARMV4I)\Debug\moc_newentrydialog.obj"

".\STANDARDSDK_500 (ARMV4I)\Debug\updatedialog.obj"

".\STANDARDSDK_500 (ARMV4I)\Debug\moc_updatedialog.obj"
]
Creating command line "link.exe @"c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\RSP0000D631643512.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Output Window Moc'ing updatedialog.h...
Compiling...
updatedialog.cpp
Compiling...
moc_updatedialog.cpp
Linking...
moc_updatedialog.obj : error LNK2019: unresolved external symbol "private: void __cdecl UpdateDialog::On_btnSubmitNE_pressed(void)" (?On_btnSubmitNE_pressed@UpdateDialog@@AAAXXZ) referenced in function "public: virtual int __cdecl UpdateDialog::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@UpdateDialog@@UAAHW4Call@QMetaObject@@HPAPAX@Z)
C:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\Debug\barcoderRebuild.exe : fatal error LNK1120: 1 unresolved externals
Results Build log was saved at "file://c:\Documents and Settings\Joseph OfficeDesktop\My Documents\Visual Studio 2008\Projects\barcoderRebuild\barcoderRebuild\STANDARDSDK_500 (ARMV4I)\Debug\BuildLog.htm"
barcoderRebuild - 2 error(s), 0 warning(s)


thanks in advance.

kevin