Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: James Kuyper Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.python Subject: Re: Python recompile Date: Fri, 7 Mar 2025 13:17:28 -0500 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: <1271577127.762934502.070704.DerTopper-web.de@news.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 07 Mar 2025 19:17:30 +0100 (CET) Injection-Info: dont-email.me; posting-host="efa2433320ee71a4b171e98df0423951"; logging-data="3851398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Bpmbu7bQqFlNWjsaRiDCBjt0efTcCQ6A=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:oEn2qcssQBJaFW4/m3hfoWJx24I= In-Reply-To: <1271577127.762934502.070704.DerTopper-web.de@news.eternal-september.org> Content-Language: en-US Xref: csiph.com comp.lang.c:390873 comp.lang.c++:121900 comp.lang.python:197357 On 3/6/25 01:35, Stuart Redmann wrote: ... > IIRC, there are two different ways of compiling code, position dependent or > position independent (PIC). Apparently you cannot mix these two kinds of > code into a single executable. So if you are using a library that has been > compiled with PIC turned on, you’ll have to compile your code the same way. Trick question: what changes do you need to make to your C source code to determine whether position dependent or position independent code is generated? > There should be a command line parameter/IDE setting to do so, depending on > your toolchain So, there's no general answer, there's a different answer for different toolchains. And so the best place to get a toolchain-specific answer is in a forum devoted to the toolchain you use.