creating dso's
From: Eric (nospam_at_email.com)
Date: 11/23/05
- Next message: Paul Pluzhnikov: "Re: creating dso's"
- Previous message: Moe: "Compile Error When Building ALSA Application"
- Next in thread: Paul Pluzhnikov: "Re: creating dso's"
- Reply: Paul Pluzhnikov: "Re: creating dso's"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 22 Nov 2005 16:16:46 -0800
system: debian based for x86
I'm trying to create an executable that uses dso's. It compiles and link's
ok but in the dso I need to refer to a global var in the main executable:
volatile int volvar;
all sources are .cpp files so i'm using g++
I can load the module and reference it if there is no reference to the
global variable. If i try to load the module using dlopen and the module
references the global volvar i get an error "undefined symbol volvar"
error from dlopen when i run the program.
I thought the -rdynamic flag would solve it but it doesnt.
I also tried wrapping the declartion in extern "C"
ie:
extern "C" volatile int volvar; // in main program
extern "C" volatile int volvar; // in dso
Can anyone show me a proper make file to compile the main and dso
so the dso can reference global variables and fns?
Thanks
Eric
- Next message: Paul Pluzhnikov: "Re: creating dso's"
- Previous message: Moe: "Compile Error When Building ALSA Application"
- Next in thread: Paul Pluzhnikov: "Re: creating dso's"
- Reply: Paul Pluzhnikov: "Re: creating dso's"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|