[Numpy-discussion] compiling c extension

Danny Chan chan_dhf@yahoo...
Tue Jan 22 02:46:41 CST 2008


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 <lou_boog2000@yahoo.com> 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. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080122/9ad8e985/attachment-0001.html 


More information about the Numpy-discussion mailing list