C: Running Unix configure file in Windows

Posted by Shiftbit on Stack Overflow See other posts from Stack Overflow or by Shiftbit
Published on 2010-03-26T21:29:21Z Indexed on 2010/04/05 2:33 UTC
Read the original article Hit count: 644

Filed under:
|
|
|

I would like to port a few applications that I use on Linux to Windows. In particular I have been working on wdiff. A program that compares the differences word by word of two files.

Currently I have been able to successfully compile the program on windows through Cygwin. However, I would like to run the program natively on Windows similar to the Project: UnixUtils.

How would I go about porting unix utilities on a windows environment?

My possible guess it to manually create the ./configure file so that I can create a proper makefile. Am I on the right track? Has anyone had experience porting GNU software to windows?

Update:

I've compiled it on Code::Blocks and I get two errors:

  • wdiff.c|226|error: `SIGPIPE' undeclared (first use in this function)

  • readpipe.c:71: undefined reference to `_pipe'

  • readpipe.c:74: undefined reference to `_fork

This is a linux signal that is not supported by windows... equvilancy?

  • wdiff.c|1198|error: `PRODUCT' undeclared (first use in this function)|

this is in the configure.in file... hardcode would probably be the fastest solution...

Outcome:

MSYS took care of the configure problems, however MinGW couldnt solve the posix issues. I attempt to utilize pthreads as recommended by mrjoltcola. However, after several hours I couldnt get it to compile nor link using the provided libraries. I think if this had worked it would have been the solution I was after. Special mention to Michael Madsen for MSYS.

© Stack Overflow or respective owner

Related posts about c

    Related posts about Windows