Just thinking of making something but I need a bit of help.
My question is simple:
How can I interface the scratch source to call DLL functions? I don't know much about dlls but I have read the scratch plugin source and understand how they are made. I plan on making one with python.
Last edited by midnightleopard (2011-12-21 16:55:36)
Offline
roijac wrote:
you can't compile python into machine code
![]()
you can, you just need an external application.
Offline
In short, you can't. DLLs are files that are specific to Windows. Python can be run on Windows, Mac, even Linux. You would have to get a special compiler that is able to compile python into machine language. This is no simple task, and I do not know whether such a compiler exists. Even if one does, you would still have a better, easier, more efficient, and more capable approach if you just wrote one in C or C# (C sharp)
-bobbybee
Offline

I can make it with C, who even cares. I just want to know how to INTERFACE DLLS WITH SQUEAK.
Offline
In that case, I can't help you
(and the picture is scary)
Offline
FFI, the Squeak Foreign Function Interface, is used to call functions located in shared libraries that are not part of the Squeak VM nor its plugins.
http://wiki.squeak.org/squeak/1414
Offline
jimmyscratchlab wrote:
FFI, the Squeak Foreign Function Interface, is used to call functions located in shared libraries that are not part of the Squeak VM nor its plugins.
http://wiki.squeak.org/squeak/1414
roijac wrote:
here you go
Finally. Thank you.
Offline
My FFI(Foreign Function Interface) testing
http://jimmyscratchlab.blogspot.com/201 … ltalk.html
Offline
bobbybee wrote:
In short, you can't. DLLs are files that are specific to Windows. Python can be run on Windows, Mac, even Linux. You would have to get a special compiler that is able to compile python into machine language. This is no simple task, and I do not know whether such a compiler exists. Even if one does, you would still have a better, easier, more efficient, and more capable approach if you just wrote one in C or C# (C sharp)
-bobbybee
Or VB
Offline
DAFFY22!!! Seriously, though
Offline
jimmyscratchlab wrote:
My FFI(Foreign Function Interface) testing
http://jimmyscratchlab.blogspot.com/201 … ltalk.html
never thought a weird website in Chinese could be so helpful.
Offline
bobbybee wrote:
In short, you can't. DLLs are files that are specific to Windows. Python can be run on Windows, Mac, even Linux. You would have to get a special compiler that is able to compile python into machine language. This is no simple task, and I do not know whether such a compiler exists. Even if one does, you would still have a better, easier, more efficient, and more capable approach if you just wrote one in C or C# (C sharp)
-bobbybee
*loud breath*
NO.
USE C++
Offline
B, C, C#, C++, Objective-C, Objective-C++, D, D++ -- eh, it's all the same.
Offline
bobbybee wrote:
B, C, C#, C++, Objective-C, Objective-C++, D, D++ -- eh, it's all the same.
Don't try diving into C right after learning C++. They are surprisingly different, and I prefer C++. My extension will likely be written in C++.
Offline
I know, I just mentioned it because I learned C as my first (real) programming language.
Offline
I have a similar Problem (with a existing dll), did you found a good Tutorial or something?
I didn't find the discussion if a dll shoulb be written in C++, C or whatever not so helpful in regard of the primal post.
Offline
Really! I learned C# by learning VB!
But back to the point!
Its very simple to interface dlls with scratch/squeak.
Me and my friend are making a mod of scratch that imports a dll and uses each function and sub as a block. Anyone wanna help?
PEPPERTREE Productions (PtP)Offline
If you want to, just email me at [email removed by moderator]
Last edited by sparks (2012-04-23 17:50:47)
PEPPERTREE Productions (PtP)Offline