I have written a C++ program in windows and it fails to work on linux
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have written a C++ program in windows and it fails to work on linux
I have wriiten a program in windows using C++ and Qt as a GUI helper my problem exists when i copy my compiled files across to linux using a USB storage device linux wont recognise my main.o file is that just because i need to recompile it on linux before i attempt to run it. I get a binary failure. Is this because im too lazy to download the compiler that works with Qt on linux or is it a more serious error with my program?
The standard compiler on linux should not have an issue with qt. In order to compile thing that depend on other libs (QT for example) you need the -devel version of the package (qt-devel in this case). This example is how RH based systems work, but other distros usually follow a similar pattern.
As for the other issue, Windows and Linux are *incompatible* at binary level, just like you can't run a Windows program on MacOSX or in a PlayStation. You might want to try to run your program under Wine, though. It's a little toy that will let you run some programs compiled for Windows under Linux. The key word is "some".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.