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

2021-11-15 Thread Eryk Sun
On 11/14/21, Marco Sulla wrote: > On Sun, 14 Nov 2021 at 16:42, Barry Scott wrote: > >> On macOS .dynlib and Unix .so its being extern that does this. > > And extern is the default. I understand now. Per Include/exports.h and Include/pyport.h, Python should be built in Unix with "default" visibi

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

2021-11-14 Thread Marco Sulla
On Sun, 14 Nov 2021 at 16:42, Barry Scott wrote: > > Sorry iPad sent the message before it was complete... > > > On 14 Nov 2021, at 10:38, Marco Sulla wrote: > > > > Okay, now the problem seems to be another: I get the same "unresolved > > external link" errors, but only for internal functions. >

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

2021-11-14 Thread Barry Scott
Sorry iPad sent the message before it was complete... > On 14 Nov 2021, at 10:38, Marco Sulla wrote: > > Okay, now the problem seems to be another: I get the same "unresolved > external link" errors, but only for internal functions. > > This seems quite normal. The public .lib does not expose t

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

2021-11-14 Thread Marco Sulla
Okay, now the problem seems to be another: I get the same "unresolved external link" errors, but only for internal functions. This seems quite normal. The public .lib does not expose the internals of Python. The strange fact is: why can I compile it on Linux and MacOS? Their external libraries exp

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

2021-11-13 Thread Marco Sulla
. Sorry, the problem is I downloaded the 32 bit version of VS compiler and 64 bit version of Python.. On Sat, 13 Nov 2021 at 11:10, Barry Scott wrote: > > > > > On 13 Nov 2021, at 09:00, Barry wrote: > > > > > > > >> On 12 Nov 2021, at 22:53, Marco Sulla wrote: > >> > >> It seems that o

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

2021-11-13 Thread Barry Scott
> On 13 Nov 2021, at 09:00, Barry wrote: > > > >> On 12 Nov 2021, at 22:53, Marco Sulla wrote: >> >> 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. > > I think you need the python310.lib (not sure o

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

2021-11-13 Thread Barry
> On 12 Nov 2021, at 22:53, Marco Sulla wrote: > > 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. I think you need the python310.lib (not sure of file name) to get to the internal symbols. You can use t

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

2021-11-12 Thread Marco Sulla
On Fri, 12 Nov 2021 at 21:09, Chris Angelico wrote: > > On Sat, Nov 13, 2021 at 7:01 AM Marco Sulla > wrote: > > On Fri, 12 Nov 2021 at 17:38, Chris Angelico wrote: > > > Are you sure that you really need Py_BUILD_CORE? > > > > Yes, because I need the internal functions of `dict`. So I need to >

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

2021-11-12 Thread Chris Angelico
On Sat, Nov 13, 2021 at 7:01 AM Marco Sulla wrote: > On Fri, 12 Nov 2021 at 17:38, Chris Angelico 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. > >

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

2021-11-12 Thread Marco Sulla
Chris? Maybe I'm dreaming X-D On Fri, 12 Nov 2021 at 17:38, Chris Angelico 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://githu

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

2021-11-12 Thread Chris Angelico
On Sat, Nov 13, 2021 at 3:28 AM Marco Sulla wrote: > > On Fri, 12 Nov 2021 at 15:55, Gisle Vanem wrote: > > Marco Sulla wrote: > > > Error LNK2001: unresolved external symbol PyErr_SetObject > > > > > > and so on. > > > > > > I post the part of my setup.py about the C Extension: > > > > > > extra

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

2021-11-12 Thread Marco Sulla
On Fri, 12 Nov 2021 at 15:55, Gisle Vanem wrote: > Marco Sulla wrote: > > Error LNK2001: unresolved external symbol PyErr_SetObject > > > > and so on. > > > > I post the part of my setup.py about the C Extension: > > > > extra_compile_args = ["-DPY_SSIZE_T_CLEAN", "-DPy_BUILD_CORE"] > > Shouldn't

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

2021-11-12 Thread Gisle Vanem
Marco Sulla wrote: Error LNK2001: unresolved external symbol PyErr_SetObject and so on. I post the part of my setup.py about the C Extension: extra_compile_args = ["-DPY_SSIZE_T_CLEAN", "-DPy_BUILD_CORE"] Shouldn't this be "-DPy_BUILD_CORE_MODULE"? -- --gv -- https://mail.python.org/mailm

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

2021-11-12 Thread Marco Sulla
I have no problem compiling my extension under Linux and MacOS. Under Windows, I get a lot of Error LNK2001: unresolved external symbol PyErr_SetObject and so on. I post the part of my setup.py about the C Extension: extra_compile_args = ["-DPY_SSIZE_T_CLEAN", "-DPy_BUILD_CORE"] undef_macros =

Re: Building a python extension on Windows

2015-10-27 Thread Jeff Archer
eff *From: *Ken Brooks > *Sent: *Tuesday, October 27, 2015 5:09 > *To: *python-list@python.org > *Cc: *Ken Brooks > *Subject: *Building a python extension on Windows > > > > > > I checked out a copy of svn.python.org/projects/stackless/trunk because > it seems to hav

Re: Building a python extension on Windows

2015-10-27 Thread Zachary Ware
On Mon, Oct 26, 2015 at 11:17 PM, Ken Brooks wrote: > I checked out a copy of svn.python.org/projects/stackless/trunk Sorry I don't have the time at the moment for a more complete answer, but I will point out that that is not the right repository for anything anymore. For one thing, it's very ou

RE: Building a python extension on Windows

2015-10-27 Thread Christopher Wilcox
5:09 To: python-list@python.org Cc: Ken Brooks Subject: Building a python extension on Windows I checked out a copy of svn.python.org/projects/stackless/trunk because it seems to have a good sample project (PC/example_nt) for building a Python extension on Windows. That directory has a

Re: Building a python extension on Windows

2015-10-27 Thread Chris Angelico
On Tue, Oct 27, 2015 at 3:17 PM, Ken Brooks wrote: > I checked out a copy of svn.python.org/projects/stackless/trunk because it > seems to have a good sample project (PC/example_nt) for building a Python > extension on Windows. That directory has a Microsoft Visual C++ solution > fi

Building a python extension on Windows

2015-10-27 Thread Ken Brooks
I checked out a copy of svn.python.org/projects/stackless/trunk because it seems to have a good sample project (PC/example_nt) for building a Python extension on Windows. That directory has a Microsoft Visual C++ solution file which can be updated to my Visual C++ version (8, of 2005). First I

Re: Extension on Windows

2010-11-19 Thread Eric Frederich
On Fri, Nov 19, 2010 at 8:12 AM, Ulrich Eckhardt wrote: > Eric Frederich wrote: >> Do I put them [DLL dependencies] in some environment variable? >> Do I put them in site-packages along with the .pyd file, or in some >> other directory? > > Take a look at the LoadLibrary() docs: >  http://msdn.mic

Re: Extension on Windows

2010-11-19 Thread Ulrich Eckhardt
Eric Frederich wrote: > Do I put them [DLL dependencies] in some environment variable? > Do I put them in site-packages along with the .pyd file, or in some > other directory? Take a look at the LoadLibrary() docs: http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx These further lead

Re: Extension on Windows

2010-11-19 Thread Eric Frederich
On Fri, Nov 19, 2010 at 7:28 AM, Ulrich Eckhardt wrote: >> Now when I created a 2nd function to wrap a library function I get the >> following. >> >> ImportError: DLL load failed: The specified module could not be found. > > This can mean that the module itself couldn't be loaded or that one of t

Re: Extension on Windows

2010-11-19 Thread Ulrich Eckhardt
Eric Frederich wrote: > I am trying to create an extension on Windows and I may be over my > head but I have made it pretty far. > > I am trying to create bindings for some libraries which require me to > use Visual Studio 2005. > > I set up the spammodule example and in V

Extension on Windows

2010-11-18 Thread Eric Frederich
Hello, I am trying to create an extension on Windows and I may be over my head but I have made it pretty far. I am trying to create bindings for some libraries which require me to use Visual Studio 2005. I set up the spammodule example and in VS set the output file to be a .pyd file. When I

Incorrect compiler found building extension on windows

2008-09-08 Thread Patrick Stinson
I built python-2.5.1 from source using Visual Studio 2005, and am also trying to build my extension using distutils and Visual Studio 2005. Distutils complains about python being built with VS 2003, which is not on my system, and the only python binaries I have on my system are the ones I built fro

Re: distutils and binding a script to a file extension on windows

2006-05-14 Thread Miki
Hello Alex, Not really an answer but if you use InnoSetup (http://www.jrsoftware.org/) you can set file type association (see http://www.jrsoftware.org/isfaq.php) HTH, Miki -- http://mail.python.org/mailman/listinfo/python-list

distutils and binding a script to a file extension on windows

2006-05-13 Thread Alexandre Guimond
Hi. I built a little installer on windows XP using distutils for my package. In there i add a few files to the python script directory. I would like one of these scripts to be the default program to be used by files with a given extention (e.g. i have an image viewer and would like it to be used w