Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

War is never imperative. -- McCoy, "Balance of Terror", stardate 1709.2


devel / comp.lang.python / Re: Unable to compile my C Extension on Windows: unresolved external link errors

SubjectAuthor
o Re: Unable to compile my C Extension on Windows: unresolved externalMarco Sulla

1
Re: Unable to compile my C Extension on Windows: unresolved external link errors

<mailman.5.1636757470.15285.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20379&group=comp.lang.python#20379

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: Marco.Sulla.Python@gmail.com (Marco Sulla)
Newsgroups: comp.lang.python
Subject: Re: Unable to compile my C Extension on Windows: unresolved external
link errors
Date: Fri, 12 Nov 2021 23:50:31 +0100
Lines: 31
Message-ID: <mailman.5.1636757470.15285.python-list@python.org>
References: <CABbU2U-d0f=mD5DXxgnDr=qc=p-XsFfi83YCd=vcFEXURHJymw@mail.gmail.com>
<e8f1169e-8ea9-420b-5503-2befa5495b88@gmail.com>
<CABbU2U8Pp7KOVhzrHACVhx8ye4bx7XernrQ8GLjY+VFKv6ttHQ@mail.gmail.com>
<CAPTjJmqDPku3x_QcuV0OXcfzKEGyN+sww-JseMBwsfo-fw6OLg@mail.gmail.com>
<CABbU2U_e4BqukXXzq=97Wxiph6m4EsNpk-tHCbPi5DUMp18YMg@mail.gmail.com>
<CAPTjJmqSDxbvH6fGYEG6fKRQ1DoE6+CMGpUPoKURX3bVE6a_tg@mail.gmail.com>
<CABbU2U_uEeA+0mE0FygzicOhnqS3wNb75rk3gSPPjgU-DHJnHg@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de nN2onxRqFgfGUvlgmTCoMAyKlGTgNs+lZeqL4uDbwovQ==
Return-Path: <elbarbun@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=lgPpW59S;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Unable': 0.03;
'url-ip:140.82.114/24': 0.03; 'url-ip:140.82/16': 0.03;
'library.': 0.05; 'subject:Windows': 0.07; 'angelico': 0.09;
'anyway,': 0.09; 'cc:addr:python-list': 0.09; 'deeper': 0.09;
'library,': 0.09; 'linux': 0.09; 'received:209.85.219': 0.09;
'url:github': 0.14; 'url-ip:140/8': 0.15; '7:01': 0.16;
'cc:name:python list': 0.16; 'exported': 0.16; 'extensions': 0.16;
'flag.': 0.16; 'from:name:marco sulla': 0.16; 'indeed': 0.16;
'received:209.85.219.177': 0.16; 'received:mail-
yb1-f177.google.com': 0.16; 'something).': 0.16; 'windows.': 0.16;
'wrote:': 0.16; 'problem': 0.16; 'instead': 0.17;
'cc:addr:python.org': 0.20; "i've": 0.22; 'fri,': 0.22; 'sat,':
0.22; 'version': 0.23; 'header': 0.23; 'stuff': 0.25; 'cc:2**0':
0.25; 'seems': 0.26; "isn't": 0.27; 'chris': 0.28; 'deep': 0.31;
"doesn't": 0.32; '13,': 0.32; 'objects': 0.32; 'said,': 0.32;
'message-id:@mail.gmail.com': 0.32; 'but': 0.32; 'windows': 0.34;
'core': 0.34; 'mean': 0.34; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'understood': 0.35; 'yes,': 0.35;
'from:addr:gmail.com': 0.35; 'functions': 0.36; 'really': 0.37;
'received:209.85': 0.37; 'put': 0.38; 'received:209': 0.39; 'two':
0.39; 'should': 0.40; 'including': 0.60; 'best': 0.61; 'internal':
0.63; 'that,': 0.67; '2021': 0.71; 'linking': 0.76; 'macro': 0.84;
'subject: \n ': 0.84; 'subject:link': 0.84; 'sulla': 0.84;
'duplicate': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=QGIPK3BEzmlgKlYpEHOzL7m88SHJ6OIMmzktDSGr8AY=;
b=lgPpW59SsUACKuQCqDbZ4Dv0+pJm/noC9UaLtwvsEyiicRZkTybDxP6a4+owUZ6Ox3
LCKibSBdXzr7ukCtRMYOhg4g+4Gq1KoVZr3ut1thAlSKN5Ip1uIEI9F1N4jYu6KGDgsq
xkDeLMYcUqJV6QndJUvO14awTwqxY2U4VwgqSPHyNvbrPiPgb9lpZP4LlYxY1B8T6Pb8
TMGux61hs2f/2K+If8O61YUHxNZZA1EAufyKan/4nKQwD2Eca0ofIkuUw6zPYklWGHtd
fBLJq0jhQ2Ul+oWhOiLfPzrKk6cbyZxnXLaEE5YG2/0SOGKut+68SJ7HVkpvBYz3kN0B
vv0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=QGIPK3BEzmlgKlYpEHOzL7m88SHJ6OIMmzktDSGr8AY=;
b=svfC8OIlAdIlh0DzyoHnJxiNNpbSB3B1jf69krTnkndCWlSZ2D3yS2trCQf9aox9+8
Lt0KVKg6lV3wvaDWGqFNgnV+rJiA6KTb8AX6fC8TT0Dwg/TSJA1waiBfiYpRulPyB3Ka
GSNjHAYV1zxlB+X84Jwe13AXkov7UQQFyIxx8AK8UL/OhBYB0essQFO0FZ7nPrWQ7/Ka
AyowKggduDl3jUHVhEGpjM0ZnUBaFaxKCS4dlYMl9uMenhBjmT4sxjBj3kPJdIXaTSyM
1mlO8rFIyBVtvgEe0OUaJ4zVzRs50W6ih37wLgD0PiwOpqS1ZuHWlRbMop8tDjywYfjq
BRcg==
X-Gm-Message-State: AOAM533b+SRwmTkxqFjJgSKsyp+ZFaGyGiUMJc3EzDm9j8PF3y01V4GF
/xTd++0XG6LlBRhnqxPHLJxjxKD4KKYAOLmwKn6y1nQFc08=
X-Google-Smtp-Source: ABdhPJzH4A+hBPicctovV0yNChEZH7ZnbF3KjnxXUvWfdf3HqejXSOhy8ULay7fNjDT0tQAYp+DKU/lTpYLBy2RLDpE=
X-Received: by 2002:a25:f443:: with SMTP id p3mr21372742ybe.162.1636757467879;
Fri, 12 Nov 2021 14:51:07 -0800 (PST)
In-Reply-To: <CAPTjJmqSDxbvH6fGYEG6fKRQ1DoE6+CMGpUPoKURX3bVE6a_tg@mail.gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.36
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CABbU2U_uEeA+0mE0FygzicOhnqS3wNb75rk3gSPPjgU-DHJnHg@mail.gmail.com>
X-Mailman-Original-References: <CABbU2U-d0f=mD5DXxgnDr=qc=p-XsFfi83YCd=vcFEXURHJymw@mail.gmail.com>
<e8f1169e-8ea9-420b-5503-2befa5495b88@gmail.com>
<CABbU2U8Pp7KOVhzrHACVhx8ye4bx7XernrQ8GLjY+VFKv6ttHQ@mail.gmail.com>
<CAPTjJmqDPku3x_QcuV0OXcfzKEGyN+sww-JseMBwsfo-fw6OLg@mail.gmail.com>
<CABbU2U_e4BqukXXzq=97Wxiph6m4EsNpk-tHCbPi5DUMp18YMg@mail.gmail.com>
<CAPTjJmqSDxbvH6fGYEG6fKRQ1DoE6+CMGpUPoKURX3bVE6a_tg@mail.gmail.com>
 by: Marco Sulla - Fri, 12 Nov 2021 22:50 UTC

On Fri, 12 Nov 2021 at 21:09, Chris Angelico <rosuav@gmail.com> wrote:
>
> On Sat, Nov 13, 2021 at 7:01 AM Marco Sulla
> <Marco.Sulla.Python@gmail.com> wrote:
> > On Fri, 12 Nov 2021 at 17:38, Chris Angelico <rosuav@gmail.com> wrote:
> > > Are you sure that you really need Py_BUILD_CORE?
> >
> > Yes, because I need the internal functions of `dict`. So I need to
> > compile also dictobject.c and include it. So I need that flag.
> >
> > This is the code:
> >
> > https://github.com/Marco-Sulla/python-frozendict.git
> >
>
> Ah, gotcha.
>
> Unfortunately that does mean you're delving deep into internals, and a
> lot of stuff that isn't designed for extensions to use. So my best
> recommendation is: dig even deeper into internals, and duplicate how
> the core is doing things (maybe including another header or
> something). It may be that, by declaring Py_BUILD_CORE, you're getting
> a macro version of that instead of the normal exported function.

I've not understood what I have to do in practice.... but anyway, as I
said, Py_BUILD_CORE works on Linux and MacOS. And it works also on
Windows. Indeed dictobject.c is compiled. The only problem is in the
linking phase, when the two objects should be linked in one library,
_the_ library. It seems that on Windows it doesn't find python3.lib,
even if I put it in the path. So I get the `unresolved external link`
errors.


devel / comp.lang.python / Re: Unable to compile my C Extension on Windows: unresolved external link errors

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor