简体   繁体   English

C ++ QT编程,Windows和Linux

[英]C++ qt programming, windows and linux

If I write a program in C++ using Qt on windows, can I run the program on Linux (not run .exe, but use the source code)? 如果我在Windows上使用Qt在C ++中编写程序,是否可以在Linux上运行该程序(不运行.exe,而是使用源代码)?

PS I don't mean using wine PS我不是说喝酒

If you use just the Qt framework, without any platform specific code, you will be able to compile that code on each platform. 如果仅使用Qt框架,而没有任何平台特定的代码,则可以在每个平台上编译该代码。 You will not, for example, be able to run the compiled binary from one platform directly on another, such as the Windows executable on Linux. 例如,您将无法直接从一个平台在另一个平台上运行编译的二进制文件,例如Linux上的Windows可执行文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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