Doh, as you point out, I renamed the parameter...

Thanks.

L

On 7/26/12 9:47 AM, Igor Stasenko wrote:
On 26 July 2012 18:22, Lawson English <lengli...@cox.net> wrote:

I'm getting an assertion failed  error in NBFFICallout

The debugger is point to this line:

     self assert: type loader notNil.
<==========AssertionFailure:AssertionFailed
     ^ type

check that argument name is one of the method's arguments or instance variables.
this error happens when NB cannot associate an argument name in
function signature with any variable in method's scope (or it's class
scope)

when I run this code:



+++++++++++++++
myBytes := ByteArray new: 20.
(GMPfrWrapper new) test4: myBytes withLength: 20.


++++++++++++++++
GMPfrWrapper>> test4:bytes withLength: length


     <primitive: #primitiveNativeCall module: #NativeBoostPlugin>

^ NBFFICallout cdecl: #( int _ByteTest(ulong length,  NBByteArrayPtr
byteArray) )
         module:
'/Users/lawsonenglish/Library/Developer/Xcode/DerivedData/Mandelbrot_Set-budpkxrcvoxdiocqojopadbgogzi/Build/Products/Debug/libMandelDraw.dylib'
++++++++++++++++++

I'ved checked with nm
"/Users/lawsonenglish/Library/Developer/Xcode/DerivedData/Mandelbrot_Set-budpkxrcvoxdiocqojopadbgogzi/Build/Products/Debug/libMandelDraw.dylib"

and get:

  00000e30 T _ByteTest
...


I can load the file by doing:

string := FileStream
readOnlyFileNamed:'/Users/lawsonenglish/Library/Developer/Xcode/DerivedData/Mandelbrot_Set-budpkxrcvoxdiocqojopadbgogzi/Build/Products/Debug/libMandelDraw.dylib'
     do: [:stream|
         stream binary.
         stream contents].




Suggestions?


Thanks,


L





--
Squeak from the very start (introduction to Squeak and Pharo Smalltalk for
the (almost) complete and compleate beginner).
https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all





--
Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the 
(almost) complete and compleate beginner).
https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all


Reply via email to