Using Astares's answer you can do:

 LibC system: 'my command line for compilation'

Pierre
On 18/06/2020 09:21, Shawon Hoque wrote:
Hello
Do you have any idea about compiling a C/C++ file using LibC in pharo ? if�� i can compile a C++ file using Pharo than i can run that .exe file using pharo LibC

Thanks


On Thu, Jun 18, 2020 at 3:13 PM Torsten Bergmann <astares@gmx.de> wrote:
From the filename I guess it is Windows. Should work with:

�� LibC system: 'D:/DEV_FreeCAD/build/bin/box.step'

but note that .step is not a regular executable extension like EXE and other.
More a file type that is associated with the executable of free cad.

You can also check the Process class in https://github.com/astares/Pharo-OS-Windows
if you need more control.

For detailed questions you can meet me on Pharo Discord.

Bye
T. (aka astares)


> Gesendet: Donnerstag, 18. Juni 2020 um 08:18 Uhr
> Von: "shawon58" <shawonhoque58@gmail.com>
> An: pharo-dev@lists.pharo.org
> Betreff: [Pharo-dev] Want to run C code in Pharo using UFFI
>
> 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<stdlib.h>
> #include<stdio.h>
>
> int main( void ) {
>
>�� ��int result ;
>�� ��result=system("D:/DEV_FreeCAD/build/bin/box.step");
>�� ��printf("%d",result);
>�� ��return 0;
> }
>
>
> So if anyone have idea please share with me. It will be a great help to me.
>
> Thanks for your kind help
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>
>