-
system calls with cygwin
I'm having some difficulty with the use of system calls.
I cannot get any system calls to work on any other machine besides my development workstation.
All the machines that I have tried this on are running windows XP.
I thought it was a cygwin dll dependency but I literally copied the entire contents of the cygwing\bin directory into the into the directory with this program and nothing...
Code:
int main(int argc, char** argv)
{
int error;
error = system( "notepad.exe" );
printf( "ERROR: %d \n", error);
return (EXIT_SUCCESS);
}
This program shows the system call having an error 127 every time on any other system but mine.
Any Ideas?
-
cygwin1.dll
It seems that the original cygwin1.dll from my development machine makes the system call fail. If I install cygwin locally then use the dll from that install the system calls work.
Does cygwin build customs dlls for every installation?
-
Is it possible to build a statically linked version? That would eliminate the need for each target machine to possess the necessary dlls for the program to run.
-
1) Cygwin does no such thing.
2) It's not the system call that fails. Your program doesn't even launch.
3) You cannot compile cygwin programs statically. cygwin1.dll must be a dynamic library because of the way Cygwin works.
4) I suspect that you did something wrong in copying your cygwin1.dll to the other systems.