Hello Esteban Lorenzano i can now compile using "LibC system: âg++ -o myprogram myprogram.cppâ " . So can u give me idea how to set the path for compiling myprogram.cpp . Because in my case my test.cpp file is in the 'D:/DEV_FreeCAD/build/bin/ ' folder. I want to compile the file from that directory. Thanks for your Kind help Shawon Hoque On Thu, Jun 18, 2020 at 4:01 PM Esteban Lorenzano <estebanlm@netc.eu> wrote:
Hi,
You need to have gcc or clang installed, pharo will not do the compile job for you. Then you can execute something like
LibC system: âg++ -o myprogram myprogram.cppâ
Esteban
On 18 Jun 2020, at 09:42, Shawon Hoque <shawonhoque58@gmail.com> 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:25 PM hogoww <pierre.misse-chanabier@inria.fr> wrote:
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