Results 1 to 5 of 5

Thread: How to use Mingw32?

  1. #1
    Join Date
    Oct 2004
    Beans
    267

    How to use Mingw32?

    Now, I know that Mingw32 is meant to be a cross compiler, allowing you to create win32 binaries on Linux. However, I have no idea how you use it? For example, how do I use it to build wxWidgets for Windows on Linux? I have no idea where to start with Mingw32 and the information on the net seems quite sparse.
    A life devoted to things is a dead life, a stump; a God-shaped life is a flourishing tree -- Proverbs 11:28 (MSG)

  2. #2
    Join Date
    Jan 2005
    Location
    Adelaide, Australia
    Beans
    340

    Re: How to use Mingw32?

    You use mingw just like you would use a regular gcc. The whole GNU build toolchain is available, with the prefix i586-mingw32msvc-

    Here's a fragment of a script file I use when going into a mingw cross-compiling environment. There's some extra bits you may need to build the wxWidgets libs, but I don't have that script on my home computer atm.
    Code:
    export CC=i586-mingw32msvc-gcc
    export CXX=i586-mingw32msvc-g++
    export LD=i586-mingw32msvc-ld
    export AR=i586-mingw32msvc-ar
    export AS=i586-mingw32msvc-as
    export NM=i586-mingw32msvc-nm
    export STRIP=i586-mingw32msvc-strip
    export RANLIB=i586-mingw32msvc-ranlib
    export DLLTOOL=i586-mingw32msvc-dlltool
    export OBJDUMP=i586-mingw32msvc-objdump
    export RC=i586-mingw32msvc-windres
    I build the wxWidgets libs and have it install to a seperate tree (~/mingw/bin, ~/mingw/lib, etc). Then your makefile can look at the mingw wx-config script or the Ubuntu one, depending on what system you want to compile for.

  3. #3
    Join Date
    Oct 2004
    Beans
    267

    Re: How to use Mingw32?

    Thanks for the info. Shame the forums don't have a feature to mod up posts. I'd give you a +1 for that succinct answer.
    A life devoted to things is a dead life, a stump; a God-shaped life is a flourishing tree -- Proverbs 11:28 (MSG)

  4. #4
    Join Date
    Feb 2005
    Location
    Maine, USA
    Beans
    286

    Re: How to use Mingw32?

    You canrate the thread though. See the top.

  5. #5
    Join Date
    Apr 2008
    Beans
    320
    Distro
    Xubuntu 17.10 Artful Aardvark

    Re: How to use Mingw32?

    So … What's the actual command you type to build with Mingw32 (particularly for make files: e.g. instead of typing make, what do I type)?

    Looks like for a single file, I could type such as
    i586-mingw32msvc-gcc
    in place of gcc
    or
    i586-mingw32msvc-g++
    in place of g++

    I think I get how to compile single files and all, but how do I use make files with this?

    Using Jaunty, I want to compile LuaGnome for Windows.
    Last edited by kumoshk; September 5th, 2009 at 08:27 AM.

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
  •