Interfacing C library

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Interfacing C library

Karthic Kumaran
Hello,

I am creating an ID3 tag editor in squeak smalltalk. There is a C library called id3lib that is capable of parsing and modifying id3tags.
I have been searching the squeak wiki but I do not understand how to interface smalltalk code with this library(looked at FFI,Named Primitives). Any help would be greatly appreciated.

Thanking you,
Karthic Kumaran
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Interfacing C library

Tapple Gao
On Sun, Mar 13, 2011 at 03:35:12PM +0530, Karthic Kumaran wrote:
> Hello,
>
> I am creating an ID3 tag editor in squeak smalltalk. There is a C library called id3lib that is capable of parsing and modifying id3tags.
> I have been searching the squeak wiki but I do not understand how to interface smalltalk code with this library(looked at FFI,Named Primitives). Any help would be greatly appreciated.

FFI is the way to go. For instructions on using it:
http://wiki.squeak.org/squeak/1414

Basically, you create a method that contains just a pragma
detailing the calling convention of your target C method

--
Matthew Fulmer (a.k.a. Tapple)
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Interfacing C library

Tapple Gao
On Sun, Mar 13, 2011 at 08:55:07AM -0400, Matthew Fulmer wrote:
> On Sun, Mar 13, 2011 at 03:35:12PM +0530, Karthic Kumaran wrote:
> > Hello,
> >
> > I am creating an ID3 tag editor in squeak smalltalk. There is a C library called id3lib that is capable of parsing and modifying id3tags.
> > I have been searching the squeak wiki but I do not understand how to interface smalltalk code with this library(looked at FFI,Named Primitives). Any help would be greatly appreciated.
>
> FFI is the way to go. For instructions on using it:
> http://wiki.squeak.org/squeak/1414

To get it, point Monticello at http://source.squeak.org/FFI, and
load
FFI-Pools
FFI-Kernel
FFI-Tests
FFI-Win32
FFI-Unix
FFI-MacOS

The tests and platform-specific bits have some good examples on
using it too

--
Matthew Fulmer (a.k.a. Tapple)
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Interfacing C library

Karthic Kumaran
On Sun, Mar 13, 2011 at 09:04:07AM -0400, Matthew Fulmer wrote:

>  
> To get it, point Monticello at http://source.squeak.org/FFI, and
> load
> FFI-Pools
> FFI-Kernel
> FFI-Tests
> FFI-Win32
> FFI-Unix
> FFI-MacOS
>
> The tests and platform-specific bits have some good examples on
> using it too
>
> --
> Matthew Fulmer (a.k.a. Tapple)
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

Thank you for your time,
Karthic Kumaran
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners