Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 10-28-2003, 07:38 PM   #1
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
Smile OS independant Plugins in C

I have been looking around for a while. But I can't seem to find anything useful on the plugins. I want to have my program use plugins. I want to be able to include the programs main header in my plugin(s), and call any function or change any variable of the main program. Like this:

#include "main_program.h"

int plugin_main(int argc, char **argv)
int i;
for (i=1;i<argc;i++)

> compile plugin.c with gcc -c etc...


int global_int;

void main_print(char *);

#include <stdio.h>

void main_print(char *cpStr)
printf("%s", cpStr);

int main(int argc, char **argv)
/* Load plugin*/
/* Run plugin (plugin_main(argc, char **argv)) */
return 0;

>compile main_program.c with gcc once

If I haven't made myself clear: I don't want to have to recompile main_program for each plugin. I want to compile it once, and then make as many plugins as I need. How can I do this???

Thanks ahead of time.

Old 10-28-2003, 08:10 PM   #2
Kurt M. Weber
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 36
Umm...plugins for what?
Old 10-28-2003, 09:53 PM   #3
Registered: Aug 2002
Distribution: Debian
Posts: 540

Original Poster
Rep: Reputation: 32

Actually I was thinking of joining the Blender project (, and spiffing up the Blender plugins code (so Blender dosn't only do Textures and Sequence). I also just want to know.
I thirst for knowlage!
Old 10-29-2003, 02:30 PM   #4
Registered: Aug 2002
Distribution: Debian
Posts: 540

Original Poster
Rep: Reputation: 32
Does anyone know anything about this or should I try somewhere else?
Old 10-29-2003, 02:52 PM   #5
jim mcnamara
Registered: May 2002
Posts: 964

Rep: Reputation: 36
To see what you are asking about - seems like its platform independence to me -
try downloading the source for zlib from

I don't think plug-ins are what c programmers think those modules are called. I do not know, but it really doesn't matter. That may be why you've gotten so little repsonse.


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
help me write a program to save independant music wearerowan General 10 09-12-2005 09:26 AM
structure independant manipulations ewt3y Linux - Newbie 1 08-15-2005 06:32 AM
Plugins Xios Linux - Software 1 02-07-2005 01:29 AM
two independant monitor on one box pawn-o-matic Linux - Laptop and Netbook 3 07-18-2004 01:12 AM
running programs independant to the virtual console Cubix Linux - Newbie 4 07-16-2003 02:48 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:15 PM.

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