delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/05/17/07:36:26

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_LR
X-Spam-Check-By: sourceware.org
Date: Mon, 17 May 2010 13:36:03 +0200 (CEST)
From: jeanherve DOT queau AT free DOT fr
To: cygwin <cygwin AT cygwin DOT com>
Message-ID: <10682169.3344481274096163492.JavaMail.root@spooler4-g27.priv.proxad.net>
Subject: Re: Problem with sunrpc
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

>On Tue, 2006-06-13 at 05:07 +0530, Zahir Koradia wrote:
>> Hi,
>> This message might be specifically for Sam Robb but am sending to the
>> whole list as others may be able to help. I installed the binaries and
>> downloaded the source of sunrpc while installing cygwin. I intended to
>> use the function clnttcp_create present in clnt.h header. The anamoly
>> I see is that in the header file the signature has no parameters and
>> in the source code the function definition has parameters.

>This should be OK, believe it or not - the sunrpc headers use older
>(K&R) style function prototypes.  Some information if you're interested:
>http://en.wikipedia.org/wiki/C_programming_language#K.26R_C


>> and the source code (clnt_tcp.c) definition had the line
><snip>
>> This code does not compile.

>It shouldn't.  This is part of the sunrpc library - you shouldn't have
>to rebuild it.

>Instead, you should be able to use the clnttcp_create() function from
>the library by including <rpc/rpc.h> in your source file, and linking to
>the rpc libraries by using -lrpc.  For example:

>/*
>  Compile: gcc -o rpc-example.exe rpc-example.c -lrpc
>*/

>#include <rpc/rpc.h>

>int main(int argc, char** argv) {
>    clnttcp_create(NULL, 0, 0, NULL, 0, 0);
>    return 0;
>}

>Note that the above doesn't actually do anything useful - it just shows
>you how to include the rpc headers, and compile and link to the rpc
>libraries.

>-Samrobb

Hi,
This test is ok but when I tried with g++ compilator it's OK (undefined ref=
erence ...).
Could you tell if it's possible to use this library with g++?
Regards,
jean-Herv=C3=A9 Qu=C3=A9au

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019