473,395 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Sharing data between libraries

I have 2 seperate libraries, compiled to .so files (these are being loaded
into a Tcl process).

I would like to be able to share data (a linked list) between these
libraries - one needs to modify the data, the other needs to search it. I
cannot be certain that both libraries will loaded at any given time.
Because the program using the libraries is Tcl, I can't store the data at
that level.

Any ideas on how I can achieve this?

Thanks,
Jon
Nov 14 '05 #1
5 1874
In <cb***********@sp15en20.hursley.ibm.com> "Jon Kneller" <kn*****@uk.ibm.com> writes:
I have 2 seperate libraries, compiled to .so files (these are being loaded
into a Tcl process).

I would like to be able to share data (a linked list) between these
libraries - one needs to modify the data, the other needs to search it. I
cannot be certain that both libraries will loaded at any given time.
Because the program using the libraries is Tcl, I can't store the data at
that level.

Any ideas on how I can achieve this?


What was your C language question?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #2
kal
"Jon Kneller" <kn*****@uk.ibm.com> wrote in message news:<cb***********@sp15en20.hursley.ibm.com>...
I have 2 seperate libraries, compiled to .so files (these are being loaded
into a Tcl process).
<snip>
Any ideas on how I can achieve this?


If "Tcl" is yet another language/environment then there
probably are newsgroups for that. My $0.02 would be to
get rid of one or both the libraries.
Nov 14 '05 #3
Thanks. I have tried comp.lang.tcl with no luck - merging the libraries is
an option but a messy one (unfortunately most of the options available seem
at least a little messy...)

Jon

"kal" <k_*****@yahoo.com> wrote in message
news:a5**************************@posting.google.c om...
"Jon Kneller" <kn*****@uk.ibm.com> wrote in message news:<cb***********@sp15en20.hursley.ibm.com>...
I have 2 seperate libraries, compiled to .so files (these are being loaded into a Tcl process).


<snip>
Any ideas on how I can achieve this?


If "Tcl" is yet another language/environment then there
probably are newsgroups for that. My $0.02 would be to
get rid of one or both the libraries.

Nov 14 '05 #4
Sorry, I have just read my post back and it was far from clear.

The question was, can I share data between 2 shared libraries in C, when
these libraries are loaded into a C program which cannot change? Is it
possible to call functions in one from the other? Is it possible to
reference data in one from the other? Is there another way to have the
libraries share data that I haven't seen?

I am investigating shared memory at the moment but am unsure if there is a
better approach.

Jon

"Dan Pop" <Da*****@cern.ch> wrote in message
news:cb**********@sunnews.cern.ch...
In <cb***********@sp15en20.hursley.ibm.com> "Jon Kneller" <kn*****@uk.ibm.com> writes:
I have 2 seperate libraries, compiled to .so files (these are being loadedinto a Tcl process).

I would like to be able to share data (a linked list) between these
libraries - one needs to modify the data, the other needs to search it. Icannot be certain that both libraries will loaded at any given time.
Because the program using the libraries is Tcl, I can't store the data at
that level.

Any ideas on how I can achieve this?


What was your C language question?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de

Nov 14 '05 #5
In <cb***********@sp15en20.hursley.ibm.com> "Jon Kneller" <kn*****@uk.ibm.com> writes:
Sorry, I have just read my post back and it was far from clear.

The question was, can I share data between 2 shared libraries in C, when
these libraries are loaded into a C program which cannot change? Is it
possible to call functions in one from the other? Is it possible to
reference data in one from the other? Is there another way to have the
libraries share data that I haven't seen?


There is nothing library specific in your questions. Once your C
libraries are becoming part of your program, everything should work as
normal (a global variable defined in one library and declared in the
other is transparently shared between the two libraries). Think about
things like stdin and stdout, usually defined in one shared library.
Ditto about calling fprintf from another library.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: varlagas | last post by:
We disabled the antivirus software but the problem persists. Any clues? Many thanks in advance! Panagiotis Varlagas ======================================================================= ...
5
by: cybertof | last post by:
Hi ! What is the common use of sharing a single .cs across multiple project files ? I think it's to share common classes between projects. I have actually a .cs file shared accross multiple...
16
by: Robert W. | last post by:
I'm building a solution that has 1 component for the Desktop and 1 component for the Pocket PC. (Though this isn't a mobile question). I have a data library that will be shared on both platforms....
6
by: matt | last post by:
hello, i am having trouble doing something. when a user triggers a certain event in my app, i need to initiate another web request to one of my other webpages, programmatically. currently, i do...
11
by: Max Vit | last post by:
I have deployed few Access apps splitting it in Front End and Back End. Our environment uses Win XP SP2 for clients, Win 2k3 for servers and Access 2003. The max. number of clients is about 50...
27
by: Jonathan Wood | last post by:
Greetings, I'd like to write any number of classes and then use those classes from any number of .NET applications. Since we've supposedly left "DLL Hell" and ActiveX objects behind, what has...
19
by: Zytan | last post by:
I want multiple instances of the same .exe to run and share the same data. I know they all can access the same file at the same time, no problem, but I'd like to have this data in RAM, which they...
9
by: Peri | last post by:
Dear All, Is there a way in which 2 application can share a common memory location to access static data? Say for example I have a product master data that is available in a single place, and...
2
by: Jeff Dege | last post by:
I'm working with a group that's been doing C++ coding for quite a long time, now, and in that environment we've pretty much worked out development practices that serve us well. We've been doing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.