LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-07-2011, 01:19 AM   #1
Krupa Gururaj
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 0
Question undefined reference error in .so while creating executable


Hi,

I am trying to create an executable from a .c file by linking a shared library ( .so ) which is already created using a makefile.
.c file is compiling but while linking its throwing an error from .so saying undefined reference. See below.

/usr/lib/libequ.so: undefined reference to `iirQ14'
/usr/lib/libequ.so: undefined reference to `ROUNDQ15'
/usr/lib/libequ.so: undefined reference to `iirQ14LongCoef32'
/usr/lib/libequ.so: undefined reference to `iirQ14Long'
make: *** [project] Error 1

I am using ubuntu linux. Following is my command to create an executable -

project : mp4040equ_test.o
arm-none-linux-gnueabi-ld mp4040equ_test.o -o project -L /usr/lib -lstdc++ -lequ

-- where i am linking my own library as well as stdc++ library using -l.

Thanks in advance.

Last edited by archtoad6; 04-07-2011 at 05:59 AM. Reason: Moved: This thread is more suitable in Programming and has been moved accordingly
 
Old 04-07-2011, 07:48 PM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Those undefined reference errors are indicating that the linker cannot resolve these functions: iirQ14, ROUNDQ15, iirQ14LongCoef32, and iirQ14Long.

Your post seems to imply that you think they are defined with the libequ.so library; my question to you is... are you 100% sure? Or is it possible that the libequ.so is in a directory other than /usr/lib?

P.S. I know that those functions are not part of libstdc++.so.
 
Old 04-08-2011, 08:54 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Please put code, command line output, config files, etc. inside [CODE] tags, aka "Code:" blocks.

It will make your posts easier to read, & that will get you more, faster, better answers. -- Help us help you.

Thank you.

P.S. - You can edit your post(s) to do this retroactively.

Last edited by archtoad6; 04-08-2011 at 08:57 AM. Reason: add P.S.
 
  


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 error jacques83 Programming 20 04-11-2013 07:23 AM
undefined reference to error in C++ knobby67 Programming 3 01-19-2008 10:34 PM
undefined reference error ilnli Programming 2 08-02-2007 08:34 PM
undefined reference error bahadur Programming 5 07-25-2006 09:18 PM
undefined reference error Quest101 Programming 3 01-01-2005 12:27 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration