From: undisclosed on

when i worked with Windows i will use DEV C++ compiler and i ll use
system(); to invoke the exe files..... now in Linux we don't have exe
files.... so how can i execute the executable files through a C
program..... in GCC system() is not present :) :) pl.. help me out....
thanks in advance , awaiting for ur reply :)


--
vignesh1988i
From: Jasen Betts on
On 2010-03-29, undisclosed <undisclosed> wrote:
>
> when i worked with Windows i will use DEV C++ compiler and i ll use
> system(); to invoke the exe files.....

> now in Linux we don't have exe files....

linux doesn't use file extensions like windows does.

just use the filename if it's in the path. If it's in the current
directory use ./filename or if it's elsewhere use the full pathname

> in GCC system() is not present :)

it was there last time I looked, perhaps you need.

#incldue <stdlib.h>

If you need more control of the way the program is executed you can use
fork() and exec(), but seeing as system() is enough on windows you probably
don't.


--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: undisclosed on

ok i ll try it out :) thank u :) i have another doubt... pl. help me :)

i have to run a C program in my gcc compiler... i need to find that
program's execution time in milli seconds :) i don't know how to do :(
plz. help me ...



waiting for the reply :) thanks


--
vignesh1988i
From: J.O. Aho on
Jasen Betts wrote:
> On 2010-03-29, undisclosed <undisclosed> wrote:
>> when i worked with Windows i will use DEV C++ compiler and i ll use
>> system(); to invoke the exe files.....
>
>> now in Linux we don't have exe files....
>
> linux doesn't use file extensions like windows does.
>
> just use the filename if it's in the path. If it's in the current
> directory use ./filename or if it's elsewhere use the full pathname
>
>> in GCC system() is not present :)
>
> it was there last time I looked, perhaps you need.
>
> #incldue <stdlib.h>
>
> If you need more control of the way the program is executed you can use
> fork() and exec(), but seeing as system() is enough on windows you probably
> don't.

man system

or

man 3 system

will give more information about the function in question.


--

//Aho
From: SM on
2010-03-30, J.O. Aho skribis:
>
> man system
>
> or
>
> man 3 system
>
> will give more information about the function in question.

Provided one has manpages-dev installed.

--
kasmra
:wq
 |  Next  |  Last
Pages: 1 2
Prev: S.M.A.R.T disk bad
Next: S.M.A.R.T disk bad