32

What is the equivalent of ./configure in Windows?

Sometimes I download a C/C++ library and when I use the make it, it says "use ./configure" but obviously ./configure can only be used on a Linux machine and the libraries don't usually have instructions for compiling on Windows (although they do support Windows, they don't provide instructions).

For example, the library wxSVG says it works on Windows, but when I download it I don't see any instructions for compiling on Windows, and I only Linux files for configuring it.

Vilhelm Gray
  • 11,516
  • 10
  • 61
  • 114
Brad
  • 10,015
  • 17
  • 54
  • 77

5 Answers5

24

I just faced with the same issue and here is what I did,

I first installed MinGw using the installation manager (with msys base included). Then I go to C:\MinGW\msys\1.0\ folder in my pc, where msys.bat (to evoke the MinGW shell) and run it. Then on that bash screen, I navigated to the folder that I wanted to install initially. After that, using "./configure" and "make" worked just fine.

patti_jane
  • 3,293
  • 5
  • 21
  • 26
  • I'm not really sure, it'll be good if there is! it is a bit of pain, but I still use msys.bat whenever I need. – patti_jane Apr 07 '16 at 21:30
14

Actually, ./configure is not Linux-specific at all. Its original purpose was to smooth over the differences between the many variants of Unix now thankfully relegated to the dust heap of history, but nowadays it may well know how to set up things to work on Windows.

I would install the MinGW/MSYS development tools and see if the configure script is happy in that environment. (If that doesn't work, I can't help you any further.)

zwol
  • 135,547
  • 38
  • 252
  • 361
  • Thanks! Is there anyway to get the configure script to configure for MSVC, or will I need to use MinGW? – Brad Nov 14 '10 at 21:45
  • 1
    Very few open source libraries come with MSVC Project files. Even though you won't be able to build in MSVC, you can often configure libraries to use the MSVC C or C++ compiler (which can matter for C++ library interfaces) and you can still use those projects in MSVC for your own projects, once they are properly built. – SingleNegationElimination Nov 14 '10 at 22:38
3

./configure is a script that comes with the source you have downloaded. You will use it the same on windows as you do on any other operating system. Unfortunately, you will need a posix-like shell to run it. A good option for that is to use mingw or cygwin

SingleNegationElimination
  • 151,563
  • 33
  • 264
  • 304
0

I'd say that this is program dependant. You see "configure" is a program/script in the local directory, it's not a global command/program (like "dir" would be)... You either have luck to find something like "configure.bat" or "configure.cmd", or you'd have to adapt the configure-file into a BATCH-file.

MFH
  • 1,664
  • 3
  • 18
  • 38
0

You only run the ./configure command when building certain applications from source.

So Unzip it where you want to install it and then go to the folder where you unziped it and run "./configure"

MNeto
  • 1