Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!usc!wupost!eclnews!cec1!ppc2 From: ppc2@cec1.wustl.edu (Peter P Chiu) Subject: ipc Message-ID: <1993Mar28.164332.25103@wuecl.wustl.edu> Sender: usenet@wuecl.wustl.edu (News Administrator) Nntp-Posting-Host: cec1 Organization: Washington University, St. Louis MO Date: Sun, 28 Mar 1993 16:43:32 GMT Lines: 48 hi everyone, i want to be able to use C++ classes in IPC programs but i can't get them compiled using C++. here is an example: Script started on Sun Mar 28 10:32:19 1993 [cec1] ~ > cat ipc.c #include <sys/time.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <sys/sem.h> #include <stdio.h> main() { int shmid, semid; fork(); shmid = shmget(IPC_PRIVATE, 80, IPC_CREAT | 0600); semid = semget(IPC_PRIVATE, 13, IPC_CREAT | 0600); shmctl(shmid, IPC_RMID, NULL); semctl(semid, IPC_RMID, NULL); } [cec1] ~ > cc ipc.c [cec1] ~ > addpkg c++ -- Accessible Packages: c++ standard -- Type help unix packages for more info. [cec1] ~ > CC ipc.c "ipc.c", line 13: error: undefined function fork called "ipc.c", line 17: error: argument 4 of type union semun expected for semctl() Compilation failed [cec1] ~ > exit exit script done on Sun Mar 28 10:32:45 1993 can anyone please give me a hand? please send email to ppc2@cec1.wustl.edu thank you very much in advance peter