LinuxQuestions.org
Review your favorite Linux distribution.
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

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 10-09-2009, 02:44 AM   #1
kvkrishnaprasad
LQ Newbie
 
Registered: Oct 2009
Posts: 1
Thanked: 0
Problem with loading Shared Library


[Log in to get rid of this advertisement]
When I include this function in the file, I am able to create a DLL but not load it (dlopen)


struct A : public mem_manager_t<A>{
tlm_module *handle;
};

static void default_function(void *ctx){

A *evt = (A *)ctx;
delete evt; ----------------------------------- (1)
}


If I comment out the line (1) [delete evt], then I can load the DLL.

Any reason why the 'delete' in the global static function is causing a problem in loading DLL?

The files are compiled using -fPIC option.

Do I need to add more compiler options?
windows_xp_2003 kvkrishnaprasad is offline  
Tag This Post , , , ,
Reply With Quote
Old 10-21-2009, 08:20 AM   #2
pixellany
Moderator
 
Registered: Nov 2005
Location: Pasadena, CA
Distribution: Arch
Posts: 13,130
Thanked: 281
Moved: This thread is more suitable in <Programming> and has been moved accordingly to help your thread/question get the exposure it deserves.

Since you appear to be taling about Windows programming, you may be better off in a different forum.....
linux pixellany is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
RHEL 5 - Booting problem - error loading shared library c00kie88 Linux - Enterprise 1 06-04-2009 10:46 PM
error while loading shared library lucky6969b Programming 2 02-08-2006 01:41 AM
error while loading shared library bonniehandi Linux - Newbie 2 11-19-2005 12:43 AM
MAndrake 10 library problem : error while loading shared libraries falojah Linux - Software 13 09-22-2005 07:18 AM
Error while loading shared library : libpng12.so.0 dhanilshah Linux - Software 3 09-12-2003 05:54 AM


All times are GMT -5. The time now is 05:11 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration