Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* shm_open (Shared Memory Open) not found in OSF1 ?
@ 1998-08-25  4:00 CHOI. MYUNG JONG
  1998-08-25  4:00 ` Stefan Schwarzer
  1998-08-25  4:00 ` Vincent DELOYE
  0 siblings, 2 replies; 3+ messages in thread
From: CHOI. MYUNG JONG @ 1998-08-25  4:00 UTC (permalink / raw)




RE:   shm_open (Shared Memory Open) not found in OSF1 ?

I need to know how to handle shared memory.  
According to "Guide to Realtime programming" of OSF/1 manual, 
there are functions of shm_open, shm_unlink, etc. 
I found those are good for example and I tried to compile
one of the sample code from the book. 
Upon compiling of the code, however, I am getting link error. 
  
	$> cc -g digital.c
	ld:
	Unresolved:
	shm_open
	shm_unlink
	memlk
	$>

Do I missing any other Compiling options ?

Any info on this will be appreciated. 
Any code sample will be much appreciated. 

onions  (yctms@chollian.co.kr)




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: shm_open (Shared Memory Open) not found in OSF1 ?
  1998-08-25  4:00 shm_open (Shared Memory Open) not found in OSF1 ? CHOI. MYUNG JONG
  1998-08-25  4:00 ` Stefan Schwarzer
@ 1998-08-25  4:00 ` Vincent DELOYE
  1 sibling, 0 replies; 3+ messages in thread
From: Vincent DELOYE @ 1998-08-25  4:00 UTC (permalink / raw)


Try 
$> cc -g digital.c -L/usr/shlib -lrt

To find library to link, you can use a script like :

#!/bin/ksh
for file in /usr/shlib/* ; do
  echo $file
  nm $file | grep <shm_open | other_function_id>
done

I use this, when I don't know which lib to link.

Good luck...

-- 
-----------------------------------------------------------------------
| Vincent Deloye                 | Societe S.S.T.I                    |
| Analyste Programmeur           | 31,Av. Champollion                 |
| mailto:vincent.deloye@ssti.fr  |  31100 TOULOUSE                    |
| Tel: 05 61 43 65 73            | Tel: 05 61 43 65 65                |
-----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: shm_open (Shared Memory Open) not found in OSF1 ?
  1998-08-25  4:00 shm_open (Shared Memory Open) not found in OSF1 ? CHOI. MYUNG JONG
@ 1998-08-25  4:00 ` Stefan Schwarzer
  1998-08-25  4:00 ` Vincent DELOYE
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Schwarzer @ 1998-08-25  4:00 UTC (permalink / raw)


CHOI. MYUNG JONG <CARPE@DOOSAN.COM> wrote:
> RE:   shm_open (Shared Memory Open) not found in OSF1 ?

> Upon compiling of the code, however, I am getting link error. 
>   
> 	$> cc -g digital.c
> 	ld:
> 	Unresolved:
> 	shm_open
> 	shm_unlink
> 	memlk
> 	$>

I found, e.g., shm_open, in librt.a, so you can resolve the symbol
by adding -lrt on the command line. 
In general use the 'nm' command to find symbols in libraries, e.g., in the   
(t)csh, in /usr/lib, /usr/ccs/lib or whereever, type 

> foreach f ( lib* )
? echo $f; nm $f | fgrep <symbol>
? end

Sorry, I don't have a code example, I am more of a message passing fan for 
the applications I write.  

-- 
Stefan Schwarzer                office:  +49-(0)711-685-7606   fax: x-3658 
Uni Stuttgart, ICA 1            e-mail:          sts@ica1.uni-stuttgart.de
Pfaffenwaldring 27              pgp public key available on request/finger 
70569 Stuttgart, Germany             http://www.ica1.uni-stuttgart.de/~sts



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-08-25  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-25  4:00 shm_open (Shared Memory Open) not found in OSF1 ? CHOI. MYUNG JONG
1998-08-25  4:00 ` Stefan Schwarzer
1998-08-25  4:00 ` Vincent DELOYE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox