| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <40051D73.1070603@onera.fr> |
| Date: | Wed, 14 Jan 2004 11:44:03 +0100 |
| From: | Claude DOT Barrouil AT onera DOT fr |
| Organization: | ONERA DCSD - http://www.onera.fr/dcsd/contacts.html |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | problem linking SHM functions |
| X-Spam-Status: | No, hits=-4.3 required=6.0 tests=BAYES_01,NO_REAL_NAME,USER_AGENT_MOZILLA_UA version=2.55-onera_sri_2 |
| X-Spam-Checker-Version: | SpamAssassin 2.55-onera_sri_2 (1.174.2.19-2003-05-19-exp) |
I have a program that uses shared memory functions shmget() and shmat() and
that works fine under Linux.
My problem is that I couldn't find how to link it with Cygwin, although I
installed le last full package, cygwin1.dll is in the PATH, any other
compilations and linkages works fine.
All the info I could find is the thread starting at
http://www.cygwin.com/ml/cygwin/2002-08/msg01296.html, and the links to
cygipc and cygserver. But this info does not address this (supposed to be
trivial) linkage problem.
Where is the relevant info ?
Thanks,
Claude Barrouil
--------------- the relevant part of the codee -----------------
...
#include <cygwin/shm.h>
...
ShmId = shmget(ShmKey, ShmSiz, 0666)
...
SharedData = shmat(ShmId,NULL,0)
...
--------------- the linkage failure-----------------------------
gcc myprog.c -lm -o myprog.exe
{}/Temp/ccj8s9oV.o(.text+0x67):myprog.c: undefined reference to `_shmget'
{}/Temp/ccj8s9oV.o(.text+0xa3):myprog.c: undefined reference to `_shmat'
collect2: ld returned 1 exit status
---------------- the end ---------------------------------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |