creating dso's

From: Eric (nospam_at_email.com)
Date: 11/23/05


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



Relevant Pages

  • Re: WW1 Royal Navy DSO medal
    ... We are looking for a reference that will tell her why her relative, who served in the Royal Navy, was awarded a DSO. ... The Distinguished Service Order (DSO) was awarded to commissioned officers for distinguished service, normally in positions of command but also, and much less frequently, for individual acts of gallantry. ...
    (soc.genealogy.britain)
  • Re: WW1 Royal Navy DSO medal
    ... served in the Royal Navy, ... We have had a look in TNA but did not find a reference to help. ... Details of DSO awards certainly can appear, ...
    (soc.genealogy.britain)
  • RE: Circular conflict using ADOMD in Visual Studio
    ... DSO reference that is causing the dependency to ADODB 2.7.0.0. ... > automatically includes the ADODB interop assemly as well as ADOMD. ... > Project 'ITWOlapControls' cannot be copied to the run directory because it ...
    (microsoft.public.dotnet.framework.interop)
  • Interop/deploy Questions!
    ... then said "using DSO". ... We created an installer, using the setup project in VS, and when it installs ... This is not the path on the target machine (not even the same drive ... Is adding DSO as a reference the right way to include this? ...
    (microsoft.public.dotnet.framework.interop)