This is the mail archive of the cygwin@cygwin.com 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]

fork/exec help


Hello,

I'm trying to compile a simple fork/exec program in vc6 using cygwin but I
can't get past the vc compiler complaining about an include file:

main.cpp
c:\cygwin\usr\include\sys\_types.h(13) : error C2632: 'long' followed by
'long' is illegal
c:\cygwin\usr\include\sys\_types.h(13) : error C2144: syntax error : missing
';' before type 'long'
c:\cygwin\usr\include\sys\_types.h(13) : error C2501: '__extension__' :
missing storage-class or type specifiers
c:\cygwin\usr\include\sys\_types.h(13) : fatal error C1004: unexpected end
of file found
Error executing cl.exe.

Here's the code:

#include <sys/types.h>
#include <unistd.h>
#include <iostream.h>

int main (int argc, char** argv)
{

	cout <<"forking...."<<endl;
	pid_t pid = fork();
	 ......
}

The only thing I did in VC was add the include path to the cygwin include
files.  Any help would be appreciated.


Thanks,
Robert Lee

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]