473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

linking - QT app

I am building an application over QT. I loaded my files to a VC++
console application project.
While trying to compile my classes, I got the following set for
expcetion for all QT related classes. has anybody faced the same
issue? Plz help me out
QT version: 3.2.3
OS : Windows 2000

Exception trace,
--------------------------------------------------------------
Linking...
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall AddViewDialog::qt_property(int,int,class
QVariant *)" (?qt_property@AddViewDialog@@UAE_NHHPAVQVariant@@@ Z)
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall AddViewDialog::qt_emit(int,struct QUObject *)"
(?qt_emit@AddViewDialog@@UAE_NHPAUQUObject@@@Z)
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall AddViewDialog::qt_invoke(int,struct QUObject
*)" (?qt_invoke@AddViewDialog@@UAE_NHPAUQUObject@@@Z)
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual void * __thiscall AddViewDialog::qt_cast(char const *)"
(?qt_cast@AddViewDialog@@UAEPAXPBD@Z)
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual char const * __thiscall AddViewDialog::className(void)const "
(?className@AddViewDialog@@UBEPBDXZ)
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
static class QString __cdecl AddViewDialog::tr(char const *,char
const *)" (?tr@AddViewDialog@@SA?AVQString@@PBD0@Z)
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
static class QMetaObject * __cdecl
AddViewDialog::staticMetaObject(void)"
(?staticMetaObject@AddViewDialog@@SAPAVQMetaObject @@XZ)

....
--------------------------------------------------------------

thanks,
prak
Jul 22 '05 #1
5 4584
hasadh wrote:
I am building an application over QT. I loaded my files to a VC++
console application project.
While trying to compile my classes, I got the following set for
expcetion for all QT related classes. has anybody faced the same
issue? Plz help me out
Unresolved external errors usually appear due to one of two reasons:
either you used a library function/object but didn't supply the
library to the linker, or you declared a function yourself, used it,
and never defined it.

Which of the two situations is applicable in your case, I don't know.
Try contacting Qt online forum (on TrollTech's web site).


QT version: 3.2.3
OS : Windows 2000

Exception trace,
--------------------------------------------------------------
Linking...
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall AddViewDialog::qt_property(int,int,class
QVariant *)" (?qt_property@AddViewDialog@@UAE_NHHPAVQVariant@@@ Z)

[...]

V
Jul 22 '05 #2
Thanks for your info. I have posted in QT forum.

Victor Bazarov <v.********@comAcast.net> wrote in message news:<TW***************@newsread1.dllstx09.us.to.v erio.net>...
hasadh wrote:
I am building an application over QT. I loaded my files to a VC++
console application project.
While trying to compile my classes, I got the following set for
expcetion for all QT related classes. has anybody faced the same
issue? Plz help me out


Unresolved external errors usually appear due to one of two reasons:
either you used a library function/object but didn't supply the
library to the linker, or you declared a function yourself, used it,
and never defined it.

Which of the two situations is applicable in your case, I don't know.
Try contacting Qt online forum (on TrollTech's web site).


QT version: 3.2.3
OS : Windows 2000

Exception trace,
--------------------------------------------------------------
Linking...
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall AddViewDialog::qt_property(int,int,class
QVariant *)" (?qt_property@AddViewDialog@@UAE_NHHPAVQVariant@@@ Z)

[...]

V

Jul 22 '05 #3
This looks like you have not properly preprocessed your
C++ file, QT massages your raw C++ code and generates
further C++ code through the "moc" compiler. Any class you
derived from a QT-Object requires this step.
You cannot just load a bunch of C++ files into VC++ and
get it to work, you have to do something like:

qmake -project
qmake -tp vc ( generates a .dsp file for VC++)

where qmake is run in the directory of your sources. The first
step creates a QT-project, the second translate the ".pro" file
into a VC++ project which you can run. You will have to do
this every time you add new C++ files which define QT-widgets.
Or, figure out how to setup VC++ to do this.

dave

"hasadh" <h_****@hotmail.com> wrote in message
news:7b**************************@posting.google.c om...
Thanks for your info. I have posted in QT forum.

Victor Bazarov <v.********@comAcast.net> wrote in message

news:<TW***************@newsread1.dllstx09.us.to.v erio.net>...
hasadh wrote:
I am building an application over QT. I loaded my files to a VC++
console application project.
While trying to compile my classes, I got the following set for
expcetion for all QT related classes. has anybody faced the same
issue? Plz help me out


Unresolved external errors usually appear due to one of two reasons:
either you used a library function/object but didn't supply the
library to the linker, or you declared a function yourself, used it,
and never defined it.

Which of the two situations is applicable in your case, I don't know.
Try contacting Qt online forum (on TrollTech's web site).


QT version: 3.2.3
OS : Windows 2000

Exception trace,
--------------------------------------------------------------
Linking...
addviewdialog.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall AddViewDialog::qt_property(int,int,class
QVariant *)" (?qt_property@AddViewDialog@@UAE_NHHPAVQVariant@@@ Z)

[...]

V

Jul 22 '05 #4
In QT you have to expand macros (e.g. Q_OBJECT) before
compiling/linking. Have a look at moc, the "meta object compiler".
Infos@Google: "qt moc".
Jul 22 '05 #5
Dave Townsend wrote:
This looks like you have not properly preprocessed your
C++ file, QT massages your raw C++ code [...]


(a) Please don't top-post
(b) Please don't turn this C++ newsgroup into a Qt forum,
they have those at their web site

Thank you.

V
Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wolfgang | last post by:
I have a problem with linking my CPP Code under a irix6 machine (sgi, UNIX). In my CPP code I use some Functions which are written in Python. So its a kind of CPP wrapper for my Python functions In...
0
by: Dibyendu Roy | last post by:
Hi All, I build an object called "dblorcle" to connect to oracle database in Sun solaris box. This is built linking with various oracle ".a" (archived, for static linking) files come with standard...
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
2
by: sunil | last post by:
Hi, We have lot of c and fortran archive libraries that have complex dependencies. We have different server tasks that use some of these libraries. We have developed a tool inhouse that links...
20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
6
by: Rudy Ray Moore | last post by:
I work with a multi-project workspace. One project (the "startup" project) has a "Configuration Type" of "Application (.exe)". The other 40 projects have a "Configuration Type" of "Static Library...
0
by: Rudy Ray Moore | last post by:
I've been having trouble getting incremental linking to work under Visual C++ .net 2003 7.1 for my multi-project workspace. Ronald Laeremans and Carl Daniel (and a few others) helped me figure it...
0
by: Philip Lowman | last post by:
I am in the process of trying to migrate a couple of build solutions to Visual Studio Express 2005 from VS 2003 Professional and I am running into a weird C/C++ runtime library linking issue when...
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.