Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with MSVC or clang in MSVC mode instead of minGW? #3008

Open
tz-reinberger opened this issue Sep 7, 2023 · 1 comment
Open

Building with MSVC or clang in MSVC mode instead of minGW? #3008

tz-reinberger opened this issue Sep 7, 2023 · 1 comment

Comments

@tz-reinberger
Copy link

Is it possible to build the MXE packages with a different compiler/toolchain than minGW, such as clang in MSVC mode or MSVC?

I am currently trying to compile a project that includes a library that is not in the MXE build matrix under Linux for Windows.
The problem with this library is that its Windows build is only compatible with the MSVC toolchain.
I have sucessfully built my project using msvc-wine as well as pre-built binaries from the library (provided by the developers).
However, if I want to use other libraries, such as Qt or libpng, I would also need to obtain MSVC builds of those, which are not directly available.
So they would need to be built from source.
Since MXE already does a lot of the dependency management, I figured adapting MXE is likely a better approach than trying to compile Qt and all of its dependencies by hand with MSVC on Linux.
Another approach would be to compile all of the dependencies on a windows machine / VM once and do the final project compilation/linking/development on Linux.

So the big questions are:
Is it possible to change the compilers/toolchain MXE uses?
Is my approach adapting MXE feasable? How would one go about doing it?
Or does it make more sense to compile the sources on Windows and use the resulting binaries in Linux?

@cgilles
Copy link

cgilles commented Sep 10, 2023

Hi TZ,

As a big user of MXE for an open source project based on Qt, i hope to see an alternative to MinGW. We use QtWebEngine and this Qt component cannot cross compiled for Windows due a limitation from Google and the use of Windows Native API.

I already reported that to MXE team that Clang can be used instead MinGW in MXE. Somebody write a patch, look my comment here :

#2758

I never see that MSVC compiler can be used in Wine. It's stable enough ? It's the command line compiler only ?

Best regards

Gilles Caulier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants