I have sources written on linux quite long ago.
They are compiled good on current linux machine.
but not in VS2005.
The cause of problem is #include<getopt.h>.
Is there any correspoinding files which can be used instead of getopt.h??
I tried xgetopt.h from codeproject
http://www.codeproject.com/cpp/xgetopt.asp
but this is not compatible with getopt.h at all, and
gives lots of error in compile time.
( eg. not defined structure option, macro requied_options and so on.)
Is there any way to re-use these sources with the least modifications?
>I have sources written on linux quite long ago.
>They are compiled good on current linux machine.
[quoted text clipped - 11 lines]
>
>Is there any way to re-use these sources with the least modifications?
Download a small GNU project that uses getopt and port the getopt part. It
should be very easy, though you may have to GPL your code. Sorry, but I
don't know of any free replacement for the GNU getopt.

Signature
Doug Harrison
Visual C++ MVP
Ben Voigt - 04 Dec 2006 15:37 GMT
>>I have sources written on linux quite long ago.
>>They are compiled good on current linux machine.
[quoted text clipped - 15 lines]
> should be very easy, though you may have to GPL your code. Sorry, but I
> don't know of any free replacement for the GNU getopt.
BSD has a getopt as well that doesn't suffer from the same licensing
restrictions (you should acknowledge use of the code but no infectious
license).