Re: [Numpy-discussion] compiling c extension

2008-01-22 Thread Danny Chan
Yes, that is not the problem. The compiling of the source file works fine, it 
is when the linker tries to create the shared library file that something blows 
up.

Lou Pecora [EMAIL PROTECTED] schrieb: Did you include arrayobject.h and  call 
import_array()
in the initialization function, after the call to
Py_InitModule() ?

--- Danny Chan  wrote:

 Hi!
 I am trying to compile a c extension that uses numpy
 arrays on windows. I can compile the extension file,
 but once I get to the linking stage I get unresolved
 references to PyArray_API and import_array. Can
 anyone help me with the correct linker flags? 
 
 Thanks, Danny

[cut]
 more undefined references to `PyArray_API' follow

build\temp.win32-2.5\Release\.\python\libaid_wrap.o:libaid_wrap.c:(.text+0xc216):
 undefined reference to `import_array'
 collect2: ld returned 1 exit status
 error: command 'gcc' failed with exit status 1



-- Lou Pecora,   my views are my own.


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


   
-
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit 
dem  neuen Yahoo! Mail. ___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] compiling c extension

2008-01-22 Thread Danny Chan
Ha, found the problem! I thought I had included arrayobject.h and import_array 
correctly, but due to the preprocessor it wasn't  defined correctly!

Danny Chan [EMAIL PROTECTED] schrieb: Yes, that is not the problem. The 
compiling of the source file works fine, it is when the linker tries to create 
the shared library file that something blows up.

Lou Pecora [EMAIL PROTECTED] schrieb: Did you include arrayobject.h and  call 
import_array()
in the initialization function, after the call to
Py_InitModule() ?

--- Danny Chan  wrote:

 Hi!
 I am trying to compile a c extension that uses numpy
 arrays on windows. I can compile the extension file,
 but once I get to the linking stage I get unresolved
 references to PyArray_API and import_array. Can
 anyone help me with the correct linker flags? 
 
 Thanks, Danny

[cut]
 more undefined references to `PyArray_API'  follow

build\temp.win32-2.5\Release\.\python\libaid_wrap.o:libaid_wrap.c:(.text+0xc216):
 undefined reference to `import_array'
 collect2: ld returned 1 exit status
 error: command 'gcc' failed with exit status 1



-- Lou Pecora,   my views are my own.


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

  

-
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit 
dem   neuen Yahoo! Mail.  ___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


   
-
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit 
dem  neuen Yahoo! Mail. ___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] compiling c extension

2008-01-21 Thread Lou Pecora
Did you include arrayobject.h and  call import_array()
in the initialization function, after the call to
Py_InitModule() ?

--- Danny Chan [EMAIL PROTECTED] wrote:

 Hi!
 I am trying to compile a c extension that uses numpy
 arrays on windows. I can compile the extension file,
 but once I get to the linking stage I get unresolved
 references to PyArray_API and import_array. Can
 anyone help me with the correct linker flags? 
 
 Thanks, Danny

[cut]
 more undefined references to `PyArray_API' follow

build\temp.win32-2.5\Release\.\python\libaid_wrap.o:libaid_wrap.c:(.text+0xc216):
 undefined reference to `import_array'
 collect2: ld returned 1 exit status
 error: command 'gcc' failed with exit status 1



-- Lou Pecora,   my views are my own.


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion