LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-22-2006, 02:00 AM   #1
dimah
LQ Newbie
 
Registered: May 2006
Posts: 28

Rep: Reputation: 15
undefined reference to...


Hello, i wrote a QT program from one site and after compiling I got a message:

.obj/moc_form1.o(.gnu.linkonce.r._ZTV5Form1+0x1cc): undefined reference to `Form1::setDir(QString const&)'
.obj/moc_form1.o(.gnu.linkonce.r._ZTV5Form1+0x1d0): undefined reference to `Form1::itemHighlighted(int)'
.obj/moc_form1.o(.gnu.linkonce.r._ZTV5Form1+0x1d4): undefined reference to `Form1::itemSelected(int)'
collect2: ld returned 1 exit status

What is it and what is the way i should to use?
 
Old 12-23-2006, 02:26 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
It's a linker error indicating that the functions can not be found. Either the functions are Qt functions in which case you have to link libraries or you have written them yourself (or were supposed to download some more files) and you have not compiled/linked the files that contain these functions.

I'm not familiar with Qt, so can not for sure say what's wrong.
 
Old 12-25-2006, 03:34 AM   #3
dimah
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
So, now it works. Thank you. But i have another problem now:
Program works ok, when it starts reading files, says that:

QTextBrowser: cannot decode /data/home/tig/Script_library/scripts/pressmin.sh
 
Old 12-27-2006, 09:57 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
As said, I' don't know Qt. Read the documentation for the QTextBrowser widget (i.e. http://doc.trolltech.com/3.3/qtextbrowser.html ).

My guess from above doc is that you probably have to tell it how to interprete files with extension 'sh' using the mimesourcefactory. But I might be completely wrong.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined reference, why? george_mercury Programming 4 05-07-2009 12:15 AM
undefined reference? Sharky01252 Programming 3 11-07-2006 11:36 AM
undefined reference vkmgeek Programming 1 05-11-2006 06:37 AM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 03:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 12:38 PM


All times are GMT -5. The time now is 11:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration