Re: [Pharo-users] Want to run C code in Pharo using UFFI

2020-06-18 Thread Rob van Lopik
You may want to have a look at: https://fuhrmanator.github.io/2019/03/16/LibC-Pharo-experiments.html hth rob van lopik > > *** >

Re: [Pharo-users] Want to run C code in Pharo using UFFI

2020-06-18 Thread Tomaž Turk
OK - maybe I misunderstood your original question - the purpose of UFFI is to call functions in DLLs outside Pharo, so yes, if you would like to call that kind of function, you have to build a DLL. The usage of UFFI is well described in its booklet: https://books.pharo.org/booklet-uffi/. Best

Re: [Pharo-users] Want to run C code in Pharo using UFFI

2020-06-17 Thread shawon58
hello that means i need to create a ddl file and copy that file to pharo folder than try to run the command directly using UFFI like system("D:/DEV_FreeCAD/build/bin/box.step") is it what u are trying to say @TOMAZ Thanks by Shawon -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f13

Re: [Pharo-users] Want to run C code in Pharo using UFFI

2020-06-17 Thread Tomaž Turk
Hi, as far as I know UFFI can call DLLs, that means that your code should be compiled and linked into a DLL. So maybe the line to pursue is to look for a C interpreter (like in https://stackoverflow.com/questions/584714/is-there-an-interpreter-for-c) and call it via UFFI. Best wishes, Tomaz

[Pharo-users] Want to run C code in Pharo using UFFI

2020-06-17 Thread shawon58
Hello There i am new to Pharo, so as i learn UFFI can handle c code, but i want to know that, how to run below attached code using UFFI. #include #include int main( void ) { int result ; result=system("D:/DEV_FreeCAD/build/bin/box.step"); printf("%d",result); return 0; } So if anyone h