473,394 Members | 1,734 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,394 software developers and data experts.

Weird C++ error

Hi,
I keep getting this weird error when trying to compile a program:
CMainWindowDer.o(.text+0x3666): In function
`CMainWindowDer::OpenProjectOpties()':
/home/sakis/3e_trimester/trim-project/gui/CMainWindowDer.cpp:398: undefined
reference to `CProjectOpties::CProjectOpties[in-charge]()'
CMainWindowDer.o(.text+0x369c):/home/sakis/3e_trimester/trim-project/gui/CMainWindowDer.cpp:400:
undefined reference to `CProjectOpties::~CProjectOpties [in-charge]()'
main.o(.text+0x35): In function `main':
/home/sakis/3e_trimester/trim-project/gui/main.cpp:11: undefined reference
to `CProjectOpties::CProjectOpties[in-charge]()'
main.o(.text+0x51):/home/sakis/3e_trimester/trim-project/gui/main.cpp:17:
undefined reference to `CProjectOpties::~CProjectOpties [in-charge]()'
collect2: ld returned 1 exit status
make: *** [gui] Error 1
Can anyone help me out with this one?
I can't seem to find this error...
--Saki

--
Athanasios (Saki) Arkoudopoulos
http://lumumba.luc.ac.be/~saki/
Jul 23 '05 #1
6 1799
Saki Arkoudopoulos wrote:
to `CProjectOpties::CProjectOpties[in-charge]()'
main.o(.text+0x51):/home/sakis/3e_trimester/trim-project/gui/main.cpp:17:
undefined reference to `CProjectOpties::~CProjectOpties [in-charge]()'
collect2: ld returned 1 exit status


Have you defined the destructor for class CProjectOpties ?

--
CrayzeeWulf
Jul 23 '05 #2
Saki Arkoudopoulos wrote:
I keep getting this weird error when trying to compile a program:
CMainWindowDer.o(.text+0x3666): In function
`CMainWindowDer::OpenProjectOpties()':
/home/sakis/3e_trimester/trim-project/gui/CMainWindowDer.cpp:398: undefined
reference to `CProjectOpties::CProjectOpties[in-charge]()'
CMainWindowDer.o(.text+0x369c):/home/sakis/3e_trimester/trim-project/gui/CMainWindowDer.cpp:400:
undefined reference to `CProjectOpties::~CProjectOpties [in-charge]()'
main.o(.text+0x35): In function `main':
/home/sakis/3e_trimester/trim-project/gui/main.cpp:11: undefined reference
to `CProjectOpties::CProjectOpties[in-charge]()'
main.o(.text+0x51):/home/sakis/3e_trimester/trim-project/gui/main.cpp:17:
undefined reference to `CProjectOpties::~CProjectOpties [in-charge]()'
collect2: ld returned 1 exit status
make: *** [gui] Error 1
Can anyone help me out with this one?
I can't seem to find this error...


This seems to be a linker error. It could be that you're compiling all
..cpp files when needed, but are forgetting to add one or two of them to
the linker command line.

V
Jul 23 '05 #3
Saki Arkoudopoulos wrote:

I keep getting this weird error when trying to compile a program:
CMainWindowDer.o(.text+0x3666): In function
`CMainWindowDer::OpenProjectOpties()':
undefined reference to `CProjectOpties::CProjectOpties[in-charge]()' undefined reference to `CProjectOpties::~CProjectOpties

[in-charge]()'

You've declared a constructor and destructor for CProjectOpties,
but haven't defined them anywhere.

Or perhaps you have defined them somewhere that CMainWindowDer cannot
see. For example, if CProjectOpties is a template and the definitions
aren't #included by CMainWindowDer. Another possibility is that
you aren't passing the object file for CProjectOpties to the linker.

Jul 23 '05 #4
CrayzeeWulf wrote:

[...]

Have you defined the destructor for class CProjectOpties ?


I'm only using a couple of stl strings in that class.
That's why I left the destructor empty. Is this wrong?
Thanks for your help,

Saki
--
Athanasios (Saki) Arkoudopoulos
http://lumumba.luc.ac.be/~saki/
Jul 23 '05 #5
Old Wolf wrote:

[...]
Another possibility is that
you aren't passing the object file for CProjectOpties to the linker.


I created a makefile using qmake. Shouldn't qmake take care of this?
--Saki

--
Athanasios (Saki) Arkoudopoulos
http://lumumba.luc.ac.be/~saki/
Jul 23 '05 #6
Saki Arkoudopoulos skrev:
Old Wolf wrote:

[...]

Another possibility is that
you aren't passing the object file for CProjectOpties to the linker.

I created a makefile using qmake. Shouldn't qmake take care of this?
--Saki


Isn't qmake QT-specific?

-- Pelle
Jul 23 '05 #7

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

Similar topics

3
by: redneck_kiwi | last post by:
Hi all: I have a really weird problem. I am developing a customer catalog system for my company and as such have delved into sessions for authentication and access levels. So far, I have managed...
5
by: NanQuan | last post by:
I'm hoping someone can help me solve this error since I am at a total loss here. Usually I don't bother posting on any forums or groups on the internet and prefer to solve stuff myself but this is...
1
by: amit | last post by:
I am trying to compile the sample program genwin.sqc, using nsqlprep which is used to precompile embedded sql in C. I am getting weird errors and that is because windows.h is included in the...
2
by: Kathy Houtami | last post by:
Hi there I've been encountered with weird compile error using Access 97. The error message is "Member or data member is not found" and it highlighted a line of code that has not be changed and...
6
by: gh0st54 | last post by:
Hi I have a weird javascript error that only happens on my live server when i open the page http://www.imrated.co.uk/reg.aspx i get the error 'Problems with this page ... blablabla Line : 3...
0
by: Alan Silver | last post by:
Hello, I have two weird problems here. I have a master page file that works absolutely fine. When I load it up in VWD, I get a couple of weird (to me) errors. First, I get the error...
0
by: P Pulkkinen | last post by:
Dear all, sorry, i know this code is far little too long to debug here, but there is really annoying logical error. If someone debugs this, I really offer warm virtual handshake. What this...
7
by: dtschoepe | last post by:
Hi, I am working on a project for school and I am trying to get my head around something weird. I have a function setup which is used to get an input from stdin and a piece of memory is created...
6
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help with a combo box and this same code works on my first tab with a combo box. The error or problem i have is this code causes an index out of range error when i run it on my second combo...
4
by: d3vkit | last post by:
I recently had a friend pass along some web work for me; a simple update. I for some reason decided I would do some overhauling of the page (he had been doing straight html and I figured some php...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.