LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-19-2005, 04:38 AM   #1
mamthababu
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
Dlopen function - UNDEFINED REFERENCE


Hello All,

I am a newbie to ECLIPSE/Linux. I have created a MANAGED MAKE C++ PROJECT and have written a simple program that uses the dlopen() function.

Now the problem is, when i build this PROJECT TYPE as a "Executable(GNu)", it throws an exception 'UNDEFINED REFERENCE' in the 'dlopen' (a linux in-built function i have used in my project). Note: I have already included the HeaderFile <dlfcn.h> of dlopen function.

But when i built the same project as a 'SHARED DLL(GNu)', it compiles, builds and produces a .so(DLL) output file successfully.

I have tried to trace out similiar bug and fix for it through search engines/forums. But not of much help.

I am using the ECLISPSE3.1(with REDHATLINUX9).

PLEASE ANY HELP WILL BE REALLY APPRECIABLE.

Thanks,
Mamtha.
 
Old 07-19-2005, 10:20 AM   #2
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
Make sure you're adding the libdl.so library to the compile lien (i.e. -ldl)
 
  


Reply



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 to dlopen, dlclose, dlsym and dlerror patrickdepingui Slackware 5 02-14-2010 08:55 AM
"undefined reference" to a template class function btb Programming 3 08-25-2005 05:02 PM
undefined reference mp4-10 Programming 3 01-25-2005 12:38 PM
Undefined reference to function error Quest101 Linux - Newbie 0 12-30-2004 05:01 PM
undefined reference to a function included in a library i made!!! keos Programming 5 02-21-2004 04:02 PM

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

All times are GMT -5. The time now is 12:28 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