PDA

View Full Version : Console application should run on both Windows & LINUX platforms



sankar
25th April 2011, 12:16
Hello Experts,

I have built a console application which works fine in Windows. But I would like to know how to make it work under LINUX platform?

Thanks,
Sankar.

Zlatomir
25th April 2011, 12:21
C++ isn't portable in "executable" form.

So the simple solution is to move the code to a Linux machine (you install the Qt SDK on this machine) and then build the application for Linux.
//i guess virtual machine might be helpful, example Virtual Box (it's free).

sankar
25th April 2011, 12:27
Thanks for your quick response Zlatomir.

I will request my IT guys to try installing it and give it a try.

But i read in one of the forum/blogs that we can built it from Windows platform itself?

Sankar.

Zlatomir
25th April 2011, 12:35
Yes - you can try to find more information about cross compile.

But i guess you will eventually need to test your application in a real Linux environment. And if at the end you still have a Linux machine why bother to setup the "cross compiling stuff" - this is what i meant with the simple solution ;)

And also you can install Virtual Box on your Windows and then install Linux in a virtual machine.

sankar
25th April 2011, 12:43
Since we dont have LINUX environment setup here for development. Thats why i was hesitating to try it.

Anyway i will try some cross compile option as you said earlier.

Thanks,
Sankar.