Results 1 to 6 of 6

Thread: Compile Unix/Linux C for Windows?

  1. #1
    Join Date
    Dec 2005
    Beans
    36

    Compile Unix/Linux C for Windows?

    I would very much like to "port" dadadodo (http://www.jwz.org/dadadodo/) to Windows. It is command-line only and "it should be fairly portable ANSI C" ...

    How difficult would this be for a (mostly) novice programmer? Could someone point me in the right direction to get started?

    Many thanks.

  2. #2
    Join Date
    Apr 2008
    Beans
    175

    Re: Compile Unix/Linux C for Windows?

    You can start by downloading the source code and noting which libraries it uses to function.

    IF there's one for example that doesn't work on Linux (or Vice Versa) you would need to rewrite that section using a comparable library or technique to attempt the same function.

    I'm not very good at porting, but I understand the principles behind it, and after taking a look at this program it looks like a lot of universal functions which should port very nicely.
    Last edited by loganwm; March 2nd, 2009 at 06:01 PM.
    "Freedom is the freedom to say that two plus two equals four, if that is granted, then all else follows" - 1984

    Programming is part memorization, part implementation, and part imagination.

  3. #3
    Join Date
    Jan 2008
    Beans
    1,532

    Re: Compile Unix/Linux C for Windows?

    Cygwin is your friend.

  4. #4
    Join Date
    Jan 2008
    Location
    Raytown, MO
    Beans
    460
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Compile Unix/Linux C for Windows?

    Along with cygwin - take a look at mingw/msys
    The Tcler's Wiki http://wiki.tcl.tk Tcl Developer Exchange http://www.tcl.tk SQLite http://www.sqlite.org

  5. #5
    Join Date
    Apr 2005
    Beans
    849

    Re: Compile Unix/Linux C for Windows?

    yes go with mingw,
    but you should know that there exist no gnu toolchain for win64.
    Running 8.10 on a lenovo 3000 n200!
    Fingerprint reader doesn't work.

  6. #6
    Join Date
    Jun 2008
    Location
    New York, USA
    Beans
    777
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Compile Unix/Linux C for Windows?

    Quote Originally Posted by funkadelic View Post
    I would very much like to "port" dadadodo (http://www.jwz.org/dadadodo/) to Windows. It is command-line only and "it should be fairly portable ANSI C" ...

    How difficult would this be for a (mostly) novice programmer? Could someone point me in the right direction to get started?

    Many thanks.
    You may like this:

    http://www.q-software-solutions.de/downloaders/get_name

    Then click "Get me to the downloads".

    LCC Win32 is a nice 32 bit C/C++ compiler and IDE for Windows.

    I write small, simple utilities in C and usually develop and debug them in LCC (because it has a nice IDE and debugger), then I carry the code over to Linux.

    Most time, it compiles just fine as-is under GCC.

    Granted, what I write is VERY simple, console mode ANSI compatible stuff. More complex code may not port over so easily.

    Give it a try and see if you like it. Be sure to get the "manual.exe" and the online documentation for it.

    -- Roger
    Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •