LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-10-2009, 04:31 AM   #1
Corps
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Rep: Reputation: 0
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?
 
Old 08-10-2009, 04:33 AM   #2
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
Quote:
Originally Posted by Corps View Post
Is this because im too lazy...
Nailed it right there my friend

On a less frivilous note, though, yes, you would need to recompile it for Linux.

Last edited by nowonmai; 08-10-2009 at 04:51 AM.
 
Old 08-10-2009, 04:38 AM   #3
Corps
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Appreciate It

Thanks i appreciate it now i know i can't get around it and just have to get it. Appreciate it.
 
Old 08-10-2009, 12:50 PM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
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.
 
Old 08-10-2009, 01:35 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
http://doc.trolltech.com/4.3/tutorial-t1.html

There you are the basic idea.

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".
 
  


Reply

Tags
c++, qt


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating partitions that can be written to by both windows and linux aitzim SUSE / openSUSE 11 10-26-2005 07:43 AM
windows can't see the files written by linux feetyouwell Linux - Software 10 02-12-2005 08:59 AM
new to linux, can I install audio programs written for windows walkerj Linux - Software 2 10-08-2004 08:24 AM
have you ever written a program for linux? today53 General 33 12-05-2003 07:54 PM
a c program written for linux will work in sco unix? cybercop12us Linux - General 3 04-25-2002 08:44 AM


All times are GMT -5. The time now is 07:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration