Home > Back-end >  C : How to cross-compile from Windows to Linux?
C : How to cross-compile from Windows to Linux?

Time:09-30

I have a C module on windows which I want to compile such that I get a dynamic library for linux *.so.

Does a cross-compiler exist that can help me out?

CodePudding user response:

Several comments mentioned using Windows Subsystem for Linux. I would personally recommend this as it is far easier than trying to use a cross-compiler. It also comes with the added benefit that you can test your code in the same environment in which you compile it.

https://docs.microsoft.com/en-us/windows/wsl/about is a great resource for getting started with WSL.

  • Related