简体   繁体   中英

How to compile c++ apps from Windows for Amazon's EC2 CentOS 5?

I want to compile c++ apps (x32 and x64) from scripts in Windows for executing in Amazon EC2 Linux AMI. Linux AMI is based on CentOS 5. So i need toolchain for CentOS in Windows. I never compile apps for Linux from Windows so i am needed little help. What i need to do? What is best for me: MinGW or Cygwin? Do i need to copy include folders of devel packages for standard libs (libstdc++, glibc or other)? I already copied include folders of compiled Qt 4.7.x (i compiled it inside running EC2 instance). What options i need to specify inside .pro files for compile qt apps in Windows for Linux? I am using only qt-core and qt-network. All apps are command line apps

I strongly recommend installing Linux (a distribution similar to what Amazon gives you) inside a virtual machine on your Windows machine. It is probably much simpler and quicker than trying to build a cross-compiler, cross-compile a GNU libc, cross-compile a Qt, etc...

MinGW (or Cygwin) is not a cross-compiler on Windows targeting Linux, it is a native compiler (with a sort of Posix emulator library). It is not able to produce Linux ELF executables on Windows.

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