0

I have C/C++ program with an autoconf-based build system. It compiles for Windows just fine on Fedora (FC36) using the command mingw64-configure to configure the autoconf system.

Ubuntu's mingw64 system appears less well developed than Fedora's. It has lots of mingw64 packages, but I can't figure out how to get it to compile. I've tried various --host incantations but that frequently doesn't work: I get errors that libraries are not installed.

So what is the correct ./configure command to get MinGW to compile on Ubuntu?

vy32
  • 28,461
  • 37
  • 122
  • 246
  • If you don't have mingw-w64 versions of the dependency libraries, than the errors you get make sense. You will need to install or build these too. And your Linux package manager won't be able to help you with that. – Brecht Sanders Feb 28 '23 at 20:18
  • That's okay. What is the correct `./configure` command to use? – vy32 Mar 01 '23 at 17:24
  • Nothing wrong with your `./configure` command on condition you have the prerequisites available for the same target platform. You may need to add `-I` flags in `CFLAGS` (and CXXFLAGS if using C++) and `-L` flags to `LDFLAGS` to point to the locations of the include files and library files of those dependencies. – Brecht Sanders Mar 01 '23 at 21:23

1 Answers1

0

It appears that the answer is:

./configure --host=x86_64-w64-mingw32

See What's the difference of "./configure" option "--build", "--host" and "--target"?

See also C++ mutex in namespace std does not name a type

vy32
  • 28,461
  • 37
  • 122
  • 246