简体   繁体   中英

C++: How to cross-compile from Windows to Linux?

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?

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://learn.microsoft.com/en-us/windows/wsl/about is a great resource for getting started with WSL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM