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 05-29-2005, 10:24 AM   #1
gamehack
Member
 
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183

Rep: Reputation: 30
Plugin Architecture


Hi all,

I've been planning to make a system which I'm developing able to load plugins. Although I haven't had any experience with plugins, plugin architecture etc and I couldn't find any tutorials/papers how to design the application so i can support plugins/extensions later on. Does anyone have any links to books/tutorials/etc ? Any help is greatly appreciated.

Regards,
gamehack
 
Old 05-30-2005, 04:19 PM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
basically what you want to do is dynamic name resolution (i.e. look an object up by name at runtime).

Depending on which language you use, this is more or less easy and/or portable.

For C: google for dl, dlopen; non-portable

For python:
help(__import__)
plugins[name] = __import__(name)

If you're enthusiastic, look at the python source to see how it handles imports of .so/.dll-files; I'm afraid you might find out that it's just an ifdef, though.

hth --Jonas

PS. for C++, have a look at yacas (@sourceforge)
 
  


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
Architecture help LoserDude27 SUSE / openSUSE 2 11-27-2005 03:19 AM
how to apt-get mplayer-plugin (mozilla plugin)? hkl8324 Debian 2 06-29-2005 09:28 AM
which architecture thelastspartan Debian 5 03-12-2005 07:40 PM
Flash Plugin in Opera 7.11. Not showing up on plugin list even. binarynova Linux - Software 4 02-05-2004 07:21 AM
Architecture TX_metalhead Linux - General 5 02-04-2002 04:13 PM

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

All times are GMT -5. The time now is 01:24 PM.

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