about system() in unix

V

vivian

In c++ under unix, I use system("cadence") to call candence. But it
does not work. what is the problem?

Thank you..
 
D

Dave Townsend

vivian said:
In c++ under unix, I use system("cadence") to call candence. But it
does not work. what is the problem?

Thank you..

Perhaps you should use system("candence") ?

Other possibilities are that you have not set the PATH variable correctly,
or that
you have a typo in the name still.
 
V

vivian

thank you. It should be "cadence"... and I can run cadence at all the
directories. but can not
call it from c++.
 
K

Karl Heinz Buchegger

vivian said:
thank you. It should be "cadence"... and I can run cadence at all the
directories. but can not
call it from c++.

Then you need to figure out what the difference is.
Do you know what system() does?

it starts a new shell and passes the string you gave it
to the command processor of that shell.

So if that command processor is not able to start that program
than it has something to do with the configuration of that
shell and not with C++ per se.

Maybe the Unix-guys down the road in a different newsgroup
can help you better.
 
G

Greg Comeau

thank you. It should be "cadence"... and I can run cadence at all the
directories. but can not
call it from c++.

Even if your reduce your program down to nothing but the system() call?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top