delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/03/28/11:07:56

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CBAB385481C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1616944073;
bh=t0FZKVpbleBlC6XRDh1ucan5mLudx9J2Z6sgj0lIvCU=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=VnIeSlJBwudevW5qILAd7xyoHDRjlb9adWumzVRnQ/bg1DOSu2kOcD8KoDKFPmzbN
onI1JjtW6Bm86hpP0ffprHOTpoJqda+3FxgP5juYsBxSLFaB/K3D4uZa4GXlO2qJDJ
OWDCPssFjvblU3olqhW+eCq1DrehQFvG78DDjx38=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ABDB1385703C
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:to:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=dprjQoo64El2adQwEvm9XmkrUyIcuGOhYO5T4Ci0hi8=;
b=gxYPUnJ++M/JnYD6T8FpZW2YCy7FVXBR7aOkWYh9/vXKohfx+I/LZYfZB6m61cI8Ij
DaTdynXtk3fORfBoUspbBR77C5qHJg1LowqS2To2Y5Hlf8YSu8Wu2zEIrad2QyScw+j5
tDJAlRbji0AJRWxju2UT3FMkHFjWuMzMmgEIljDbURgSBLQhUM0njuk6ZnUjCmMemcMm
oBFYjkAzbMqoJyDZSLg5VsaT7NHcu+l6VtnY7P7Fp9+4epklmA7sUBxZ/ltjFcrwIRhd
gsDGzruJL/ot4G91yMhXASgT9eVkqGaxosGSrfqzojHxALRKHqYsY0ZY5F7X6MHTmnmU
Keiw==
X-Gm-Message-State: AOAM533bb/IU+hEBI066IzdfHqk/rgjA0oUUpw1dKj0q7kvun0jeN2dD
zcBsFt07OAEFYQ0EwdMNqXRd9Dh4Sic7wQ==
X-Google-Smtp-Source: ABdhPJzj0OktCtpZEnjgSiacmrzi3cBCRV3f5VoOspJj37O4SxTrNKM7n2cJAxE0/D5j86eRFLWvzA==
X-Received: by 2002:adf:e38a:: with SMTP id e10mr24407469wrm.37.1616944068320;
Sun, 28 Mar 2021 08:07:48 -0700 (PDT)
Subject: Re: Building the python swig tutorial
To: cygwin AT cygwin DOT com
References: <fe7572cd-0da9-ceb4-8190-510b09ce6808 AT seanet DOT com>
<b0d17d88-6d4e-b2ef-523c-f0956303ded3 AT t-online DOT de>
<d4191357-8b98-ee2c-234a-3e015f409f66 AT seanet DOT com>
Message-ID: <d94c3ed7-669d-6708-e0cf-19a3711e2692@gmail.com>
Date: Sun, 28 Mar 2021 17:07:47 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <d4191357-8b98-ee2c-234a-3e015f409f66@seanet.com>
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_SBL,
URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 12SF7u8M010008

On 28.03.2021 14:22, Brad Bell wrote:
> It was unclear from my previous message that I am using the commands 
> under the heading
>      Building a Python Module
> in the tutorial
>      http://www.swig.org/tutorial.html
> with the exception that python2.7 was changed to python3.8 because that 
> is the version of python on my cygwin system.
> 
> These commands work fine on my Fedora system (with the proper version of 
> python and without any extra libraries specified).
> 

what error ?

The Tutorial needs small adjustments for what I see:


$ swig -python -py3 example.i

$ gcc -c example.c example_wrap.c -I/usr/include/python3.8

$ gcc -shared example.o example_wrap.o -o _example.dll -lpython3.8

$ python
Python 3.8.8 (default, Mar  4 2021, 21:24:42)
[GCC 10.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import example
 >>> example.fact(5)
120

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

- Raw text -


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