473,399 Members | 2,774 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,399 software developers and data experts.

Qt gives "undefined reference" error when compiling

Hello,
let me first describe the situation: I am developing an application
using Qt Designer 3.3.5 on OpenSuSE Linux for my mp3 player. So I need
to get the id3 tags from the mp3 files, and I've downloaded the sources
of id3lib. I've included the headers (there are no other files) in my
project in Qt designer, then created an object from my files. When
starting the make command, it compiles normally all the headers
(although giving some minor warnings) but at the end it gives me an
"undefined reference" error to the constructor and destructor of the
object which I create in my source file. Please help! I've tryed
everything. Before I start make, I always start qmake, also I've
checked my .pro file for the HEADERS directive, and everything is OK -
all headers are listed normally.

Mar 7 '06 #1
6 6208
mi**********@gmail.com wrote:
Hello,
let me first describe the situation: I am developing an application
using Qt Designer 3.3.5 on OpenSuSE Linux for my mp3 player. So I need
to get the id3 tags from the mp3 files, and I've downloaded the sources
of id3lib. I've included the headers (there are no other files) in my
project in Qt designer, then created an object from my files. When
starting the make command, it compiles normally all the headers
(although giving some minor warnings) but at the end it gives me an
"undefined reference" error to the constructor and destructor of the
object which I create in my source file. Please help! I've tryed
everything. Before I start make, I always start qmake, also I've
checked my .pro file for the HEADERS directive, and everything is OK -
all headers are listed normally.


First of all, are you really compiling headers? I'm not a Qt user, but
that is not standard practice in C++.

Can you reduce the problem so that you can show us some actual code
(cf. http://www.parashift.com/c++-faq-lit...html#faq-5.9)?
If not, you will probably have more success seeking help from Trolltech
directly (do they have user forums or tech support?) or some other
newsgroup related to Qt. See the FAQ for some ideas of where you could
post:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

Mar 7 '06 #2
mi**********@gmail.com wrote:
let me first describe the situation: I am developing an application
using Qt Designer 3.3.5 on [..irrelevant..] When
starting the make command, it compiles normally all the headers
It compiles the _headers_? Really?
(although giving some minor warnings) but at the end it gives me an
"undefined reference" error to the constructor and destructor of the
object which I create in my source file.
Did you _define_ the constructor and destructor it complains about?
Please help! I've tryed
everything. Before I start make, I always start qmake, also I've
checked my .pro file for the HEADERS directive, and everything is OK -
all headers are listed normally.


Have you tried actually linking your project together? You know, by
giving the linker all the _object_ files in the *same command*? Do you
know what that means? Perhaps you should post to a newsgroup for your
compiler...

V
--
Please remove capital As from my address when replying by mail
Mar 7 '06 #3
<mi**********@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Hello,
let me first describe the situation: I am developing an application
using Qt Designer 3.3.5 on OpenSuSE Linux for my mp3 player. So I need
to get the id3 tags from the mp3 files, and I've downloaded the sources
of id3lib. I've included the headers (there are no other files) in my
project in Qt designer, then created an object from my files. When
starting the make command, it compiles normally all the headers
(although giving some minor warnings) but at the end it gives me an
"undefined reference" error to the constructor and destructor of the
object which I create in my source file. Please help! I've tryed
everything. Before I start make, I always start qmake, also I've
checked my .pro file for the HEADERS directive, and everything is OK -
all headers are listed normally.


Why don't you just include the header with one of the source files?
Mar 8 '06 #4
Well actually that's what I am doing: I include the headers in my
sources file. So about the definition, I'm using already written
sources, and as far as I can see, the constructor and destructor are
defined there. About the linker: I'm using the "make" command which
should do all the work for me. This make file is generated by qmake,
which is command of Trolltech Qt.

Mar 8 '06 #5
mi**********@gmail.com wrote:
Well actually that's what I am doing: I include the headers in my
sources file. So about the definition, I'm using already written
sources, and as far as I can see, the constructor and destructor are
defined there. About the linker: I'm using the "make" command which
should do all the work for me. This make file is generated by qmake,
which is command of Trolltech Qt.


I will reiterate then: post a minimal but compilable sample that
demonstrates the problem. If you can't do that, I will again suggest
you look for Trolltech-centric help. This forum is for discussions of
*standard* C++ language and libraries, not third-party products or
applications (see
http://parashift.com/c++-faq-lite/ho....html#faq-5.9).

Cheers! --M

PS, Please quote the message you are responding to since not everyone
is using Google Groups and the like. You can do this automatically in
Google Groups by clicking on "show options" and then "reply" in the
revealed header.

Mar 8 '06 #6
mi**********@gmail.com wrote:
Hello,
let me first describe the situation: I am developing an application
using Qt Designer 3.3.5 on OpenSuSE Linux for my mp3 player. So I need
to get the id3 tags from the mp3 files, and I've downloaded the sources
of id3lib. I've included the headers (there are no other files) in my
project in Qt designer, then created an object from my files. When
starting the make command, it compiles normally all the headers
(although giving some minor warnings) but at the end it gives me an
"undefined reference" error to the constructor and destructor of the
object which I create in my source file. Please help! I've tryed
everything. Before I start make, I always start qmake, also I've
checked my .pro file for the HEADERS directive, and everything is OK -
all headers are listed normally.

Hi, I use Qt, but can't help you with what you gave here. Generally..
you qmake -project && qmake && make if files are in the same directory.

Actually, I don't think you're going about this the right way. Unless
there is a _real_ good reason, you don't want to include the mp3
headers in the Qt designer. You should do the Qt designer stuff and
then make your own subclass off the form. You would then include the
mp3 stuff in your subclass code and using the inherited (Qt) elements.
Also, be sure you have the .so to go along with the headers.

Anyway, did you know about
http://www.qtcentre.org/ -and-
http://lists.trolltech.com/ The Qt-interest list would be the one.

--
Robert
Mar 8 '06 #7

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

Similar topics

13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
1
by: Chris | last post by:
How do I stop displaying "undefined" when using the code below. The problem occurs as I want to display 5 items per page using setInterval but this causes 'mycars' to reach a value that doesn't...
5
by: Lionel | last post by:
Hello all, two quick questions: One: What is the difference between adding a reference to something in my C# project so I can use it (for example, adding a reference to "Microsft.DirectX" when...
16
by: Paul S. Natanson | last post by:
What is a Null Reference error and how do I fix it? My newly installed VB.Net2003 gives me a "Microsoft Development Environment" error message box EVERY time I try to run/start ANY project -...
1
by: Paul S. Natanson | last post by:
What is a Null Reference error and how do I fix it? My newly installed VB.Net2003 gives me a "Microsoft Development Environment" error message box EVERY time I try to run/start ANY project -...
49
by: matty | last post by:
Hi, I recently got very confused (well that's my life) about the "undefined" value. I looked in the FAQ and didn't see anything about it. On...
9
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined...
1
by: Shuaib | last post by:
Hey! I am trying to embedd python into a C programe of mine. But when I try to compile the C code, gcc gives errors like "undefined reference to `Py_Finalize'" and the same kind for all the...
16
by: Micko1 | last post by:
Hello there :) I have been using Visual Studio on a program which I have just completed, however I need to have it compiling using a unix based compiler, when I try in cygwin, I get the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.