[Numpy-discussion] access ndarray in C++

Joris De Ridder Joris.DeRidder@ster.kuleuven...
Wed Apr 23 11:09:51 CDT 2008


On 23 Apr 2008, at 17:50, Tommy Grav wrote:

>
> On Apr 23, 2008, at 11:26 AM, Joris De Ridder wrote:
>
>>
>> They are attached to the wiki page. Click on "Attachments" in the  
>> menu
>> on the left.
>>
>> Joris
>
> Thanks. Didn't know that wiki's had that :)
>
> I tried you example on a Mac OS X 10.5.2 (I am not using Scons) and  
> got
>
> [skathi:~/Work/myCode/pyCextensions] tgrav% gcc -dynamiclib
> myextension.cpp -o libmyextension.dylibUndefined symbols:
>   "___gxx_personality_v0", referenced from:
>       ___gxx_personality_v0$non_lazy_ptr in cct0CmDB.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
> Anyone have any idea what I am doing wrong?


Try

g++ -o myextension.os -c -fPIC myextension.cpp
g++ -o libmyextension.dylib -dynamiclib myextension.os

on the bash prompt. (Or use Scons :-).

Joris


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the Numpy-discussion mailing list