Question:
How can I compile c++ (creating an executable file) for Linux within a Windows (XP) environment?
Charlie
2011-06-08 07:51:26 UTC
Hi,

I made a simple program that outputs "Hello World!" I managed to compile this in Microsoft Visual Studio Express 2010 and MinGW generating “Hello.exe.”

But I don’t want a Windows executable file. Instead, I want a Linux executable file so I can upload it to my Linux web server.

Is it possible to configure Microsoft Visual Studio Express 2010 or MinGW to do this? If not, how can I compile c++ for Linux under Windows?

Thanks,
Charlie.
Three answers:
eli porter
2011-06-08 08:04:09 UTC
g++ myprog.cpp -o myprog



and then you can run it with:

./myprog
braun
2011-06-08 07:53:53 UTC
Compile the program on linux using g++
?
2016-11-09 09:57:05 UTC
incorporate int chmod(const char *direction, mode_t mode); For mode, you need to use 755 for this purpose. as long because it is a magnificent selection, it could have the execute bit on.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...