This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I am trying to get the system() call working in my driver which I am running in a DOS terminal. For the sake of not porting out all of cygwin libraries and executables, I am trying to narrow down to a set of dll's and exe's required for my driver and only include those in my path. What I have gathered so far with the help of cygcheck is that I will need cyggcc_s-1.dll, cygiconv-2.dll, cygintl-8.dll, cygncurses-9.dll, cygreadline7.dll, cygwin1.dll, and sh.exe since system() executes the given command in a shell. My questions are as follows: 1) What .dll's and/or .exe's am I missing to be able to run the driver in a non cygwin command prompt? 2) Is it possible to run my driver (see below) in a non-cygwin prompt with a reduced set of cygwin dll's and .exe's? 3) If the system() call doesn't work when used in a non-cygwin environment, is there a windows native system() equivalent call I can use? My driver is pretty simple, just trying to get system() cmd to work in a non cygwin environment with a reduced set of dll's and exe's: int main(int argc, char * argv[]) { //Execute a popen int retval = system(NULL); if (retval == 0) cerr << "system returned zero; shell is not available" << endl; else cerr << "system returned non-zero value; shell is available" << endl; perror("The following error occurred: "); retval = system("HelloWorld.exe"); if (retval == -1) cerr << "system call failed" << endl; else cerr << "system call successful" << endl; perror("The following error occurred: "); } Thank you, Inessa
Attachment:
cygcheck.out
Description: cygcheck.out
-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |