Re: How to install Python.h on FreeBSD 10.3-RELEASE?

2016-09-20 Thread The Doctor
In article <201609...@crcomp.net>, Don Kuenz wrote: > >The Doctor wrote: >> In article <201609...@crcomp.net>, Don Kuenz wrote: >>> >>>It turns out that the question isn't "How to install Python.h?

Re: How to install Python.h on FreeBSD 10.3-RELEASE?

2016-09-20 Thread Don Kuenz
The Doctor wrote: > In article <201609...@crcomp.net>, Don Kuenz wrote: >> >>It turns out that the question isn't "How to install Python.h?" The >>question is "Why doesn't make find Python.h?" >> >>---

Re: How to install Python.h on FreeBSD 10.3-RELEASE?

2016-09-20 Thread The Doctor
In article <201609...@crcomp.net>, Don Kuenz wrote: > >It turns out that the question isn't "How to install Python.h?" The >question is "Why doesn't make find Python.h?" > >

Re: How to install Python.h on FreeBSD 10.3-RELEASE?

2016-09-20 Thread Don Kuenz
It turns out that the question isn't "How to install Python.h?" The question is "Why doesn't make find Python.h?" # uname -v FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 #

Re: How to install Python.h on FreeBSD 10.3-RELEASE?

2016-09-19 Thread The Doctor
In article <201609...@crcomp.net>, Don Kuenz wrote: > >In article you wrote: >> In article <201609...@crcomp.net>, Don Kuenz wrote: >>> >>>The installed python packages are shown below. Searches lead me to >>>believe that a PTH option make play a role. >>> >>>--

Re: How to install Python.h on FreeBSD 10.3-RELEASE?

2016-09-19 Thread Don Kuenz
In article you wrote: > In article <201609...@crcomp.net>, Don Kuenz wrote: >> >>The installed python packages are shown below. Searches lead me to >>believe that a PTH option make play a role. >> >> >>$ uname -v >>FreeBSD

Re: How to install Python.h on FreeBSD 10.0-RELEASE?

2016-09-19 Thread The Doctor
In article <201609...@crcomp.net>, Don Kuenz wrote: > >The installed python packages are shown below. Searches lead me to >believe that a PTH option make play a role. > > >$ uname -v >FreeBSD 10.0-RELEASE #0 r260789: Thu Jan

How to install Python.h on FreeBSD 10.0-RELEASE?

2016-09-16 Thread Don Kuenz
The installed python packages are shown below. Searches lead me to believe that a PTH option make play a role. $ uname -v FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/

Re: [Python-Dev] #include "Python.h"

2012-01-29 Thread Chris Angelico
On Mon, Jan 30, 2012 at 2:34 AM, Andrea Crotti wrote: > I have a newbie question about CPython. > Looking at the C code I noted that for example in tupleobject.c there is > only one include > #include "Python.h" For files like tupleobject.c there's often a corresp

Re: Undefined calling conventions in Python.h

2008-07-25 Thread Fredrik Lundh
d put the extern block around the #include call rather than individual functions, as surely the C calling convention should apply to everything within. makes it look way too much like "this is how you should use python.h" to be appropriate, given the earlier discussions in the thr

Re: Undefined calling conventions in Python.h

2008-07-25 Thread Ben Sizer
On Jul 23, 1:19 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Ben Sizer wrote: > > You should put the extern block around the #include call > > rather than individual functions, as surely the C calling convention > > should apply to everything within. > > Hello?  Python's include files are C++ sa

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Martin v. Löwis
> 1>application.obj : error LNK2031: unable to generate p/invoke for > "extern "C" void __clrcall Py_Exit(int)" (?Py_Exit@@[EMAIL PROTECTED]); > calling convention missing in metadata The main problem here is the __clrcall hint: apparently, you are using Managed C++ resp. C++/CLI, i.e. the Microso

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Fredrik Lundh
Jaco Naude wrote: Fredrik, thanks for the help. I'm not sure why but it seems to work now even if I don't include the extern "C" command. It also works with both Python.h files (after I copied pyconfig.h from the PC folder). So it seems like everything is working now. As

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Jaco Naude
ed to specify that you're not with this DLL, though I've never > had to deal with anything like that myself. > > -- > Ben Sizer Fredrik, thanks for the help. I'm not sure why but it seems to work now even if I don't include the extern "C" command. It also

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Fredrik Lundh
Ben Sizer wrote: You should put the extern block around the #include call rather than individual functions, as surely the C calling convention should apply to everything within. Hello? Python's include files are C++ safe. I even posted a complete compiler session to show that I'm not makin

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Ben Sizer
On Jul 23, 11:43 am, Jaco Naude <[EMAIL PROTECTED]> wrote: > What Visual C++ is doing is that it is looking for mangled names since > it does not know the DLL contains C functions. I've managed to work > around this by declaring the Python functions as follows before using > them in the C++ applica

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Jaco Naude
> > } > > > > This seems to work and the C++ application side is not looking for > > > mangled names any more. Is this the right way of doing it? It seems > > > unnecessary to have to declare each Python function you want to use > > > using the extern &quo

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Fredrik Lundh
Jaco Naude wrote: That said, let me double check something which might be causing problems since you will be familiar with this. Which Python.h file do you include when including the DLL in your programs? The one in the source distribution of the one in the installation distribution? I've

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Jaco Naude
Is this the right way of doing it? It seems > > unnecessary to have to declare each Python function you want to use > > using the extern "C" way as shown above. > > Eh, are you saying that you're not including the Python.h file?  Because > it does exactly that

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Fredrik Lundh
Fredrik Lundh wrote: > cl cl -EHsc -MD -I \python25\include test.cc \python25\libs\python25.lib cut and paste error there: the "cl cl" should be just one "cl", of course. and just for the record/google, if I 1) don't include the header file, I get test.cc(5) : error C3861: 'Py_Initialize':

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Fredrik Lundh
ou saying that you're not including the Python.h file? Because it does exactly that, for each and every public function in the C API. It is probably more of a C++ question it turns out, but I would think that someone in the Python group would use the Python DLL in C++. The documentation also

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Jaco Naude
e DLL using Dependency Walker and the > > functions in the DLL are clean (Thus no name mangling used). > > > How do I tell Visual C++ that the DLL is a C dll? I thought it should > > be in Python.h but this line appears at the top of the file: > > > /* Since t

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Fredrik Lundh
> How do I tell Visual C++ that the DLL is a C dll? I thought it should be in Python.h but this line appears at the top of the file: /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */ All the individual includes are wrapped in the usual

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Jaco Naude
> calling convention missing in metadata > > 1>frmPythonInterface.obj : error LNK2031: unable to generate p/invoke > > for "extern "C" void __clrcall Py_Exit(int)" (?Py_Exit@@[EMAIL PROTECTED]); > > calling convention missing in metadata > > > I'm probably missin

Re: Undefined calling conventions in Python.h

2008-07-23 Thread Fredrik Lundh
nvoke for "extern "C" void __clrcall Py_Exit(int)" (?Py_Exit@@[EMAIL PROTECTED]); calling convention missing in metadata I'm probably missing something but I can't find any calling convention details in Python.h or the other headers included in this file. the precen

Undefined calling conventions in Python.h

2008-07-23 Thread Jaco Naude
d folder of the source download and this works 100% without any warnings etc. I've done this in Debug and Release mode without any problems. When I include python_install_path\include\Python.h in my application (with the linking setup correctly to the .lib and .dll files generated by myself) it bui

Re: Regarding Python.h

2008-02-15 Thread Christian Heimes
Raj kumar wrote: > Hi to all, > I'm new to Python. > I am using python2.4. > I have one application written in c language in which it includes python like > > #include "Python.h" > > But when i try to install it, i'm getting an error like > Pyth

Regarding Python.h

2008-02-15 Thread Raj kumar
Hi to all, I'm new to Python. I am using python2.4. I have one application written in c language in which it includes python like #include "Python.h" But when i try to install it, i'm getting an error like Python.h: No such file or directory I feel gcc is unable to get the pa

Re: Trouble including Python.h

2006-06-23 Thread Tim Roberts
"Marcelo Gosling" <[EMAIL PROTECTED]> wrote: > >Hi, everyone. > >This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. > >I'm having trouble including Python.h in a C file. The following C >code: > >#include "Python.h" > &

Re: Trouble including Python.h

2006-06-23 Thread John Machin
On 24/06/2006 12:14 PM, John Machin wrote: > On 24/06/2006 7:51 AM, Marcelo Gosling wrote: >> I'm having trouble including Python.h in a C file. The following C >> code: >> In file included from ../../Python2.4/include/Python.h:74, >> from

Re: Trouble including Python.h

2006-06-23 Thread John Machin
On 24/06/2006 7:51 AM, Marcelo Gosling wrote: > Hi, everyone. > > This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. > > I'm having trouble including Python.h in a C file. The following C > code: > > #include "Python.h" > > int main() &g

Re: Trouble including Python.h

2006-06-23 Thread Marcelo Gosling
No, that didn't do the trick. The main reason I'm posting this here is that I get all tese error messages just from including Python.h, the code itself does absolutely nothing. Cheers vduber6er wrote: > Try > > #undef _DEBUG > #include "C:\Python24\include\python.h&q

Re: Trouble including Python.h

2006-06-23 Thread vduber6er
Try #undef _DEBUG #include "C:\Python24\include\python.h" or which ever path your python.h is located at works for me Marcelo Gosling wrote: > Hi, everyone. > > This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. > > I'm having trouble including Python.

Trouble including Python.h

2006-06-23 Thread Marcelo Gosling
Hi, everyone. This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. I'm having trouble including Python.h in a C file. The following C code: #include "Python.h" int main() { return 0; } when compiled with "gcc -I..\Python2.4\include\", gives more

Re: Python.h

2006-06-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I am running python to c converter application. It throws an > error saying python.h file not found. >Can somebody plz suggest how to resolve this problem. you need the python build files. if you're using Linux, look for something named

Python.h

2006-06-05 Thread praveenkumar . 117
Hi, I am running python to c converter application. It throws an error saying python.h file not found. Can somebody plz suggest how to resolve this problem. Regards, Praveen Kumar -- http://mail.python.org/mailman/listinfo/python-list

Re: IRIX MipsPro compiler chokes on Python.h

2005-05-25 Thread Bram Stolk
Andrew MacIntyre wrote: > My suspicion would be directed to a #define that is incorrect, as the > snippet above suggests that select() appears in two system headers > (/usr/include/sys/time.h & /usr/include/unistd.h). thanks for the info. I need to undef the following from my pyconfig.h to make i

Re: IRIX MipsPro compiler chokes on Python.h

2005-05-25 Thread Andrew MacIntyre
Bram Stolk wrote: > Hi there, > > I just built and installed Python-2.4.1 on my Irix machine. > My compiler, the MipsPro compiler, chokes on the Python.h include file, > as demonstrated here: > > > $ CC -v > MIPSpro Compilers: Version 7.41 > $ python -V > Pyth

Re: IRIX MipsPro compiler chokes on Python.h

2005-05-25 Thread Bram Stolk
Dennis Lee Bieber wrote: > On Tue, 24 May 2005 13:20:01 +0200, Bram Stolk <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >>$ cat l.cxx > > > Isn't ".cxx" a "C++" indicator? I think Python is just plain C, > so you'd have to wrap everything to indicate C style namin

IRIX MipsPro compiler chokes on Python.h

2005-05-24 Thread Bram Stolk
Hi there, I just built and installed Python-2.4.1 on my Irix machine. My compiler, the MipsPro compiler, chokes on the Python.h include file, as demonstrated here: $ CC -v MIPSpro Compilers: Version 7.41 $ python -V Python 2.4.1 $ cat l.cxx #include int main() { return 0; } $ CC -I $HOME

Re: where is python.h? / NumPy installation

2005-04-12 Thread martino
> > It *should* be > /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h > > In the meantime, you can snag a pre-built Numeric from > >http://pythonmac.org/packages/ It was not there to start with and by trying to install xcode from app

Re: where is python.h? / NumPy installation

2005-04-11 Thread Robert Kern
Frameworks/vecLib.framework/Headers -IInclude -IPackages/FFT/Include -IPackages/RNG/Include -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c Src/arrayobject.c -o build/temp.darwin-7.8.0-Power_Macintosh-2.3/Src/arrayobject.o Src/arrayobject.c:18:20: Python.h: No such file or directo

where is python.h? / NumPy installation

2005-04-11 Thread martino
ework/Headers -IInclude -IPackages/FFT/Include -IPackages/RNG/Include -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c Src/arrayobject.c -o build/temp.darwin-7.8.0-Power_Macintosh-2.3/Src/arrayobject.o Src/arrayobject.c:18:20: Python.h: No such file or directory In file