Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-27-2008, 11:49 PM   #1
Registered: Aug 2003
Posts: 368

Rep: Reputation: 30
copying compiled program to another computer?

if i write a simple c++ app on one linux box and compile it there,
can i copy it to another linux box (same distro) and just use it?
do i need to change anything like permissions, owner? or should i
make sure any other boxes i try to copy it to have a compiler and
just recompile the app from source?

Old 05-27-2008, 11:59 PM   #2
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Rep: Reputation: 31
Hello Babag,

I think that if its a simple application which doesn't depend on any external library, then all you need to do is to set permission for binary to executable and it should run without any problem. In case, when your application depends on any external library, then that library should be present on the target box in order to run the application.

Thanks, Kirtimaan
Old 05-28-2008, 06:41 PM   #3
Registered: May 2008
Posts: 101

Rep: Reputation: 15
If the other PC has the same architecture (for example 32-bit Intel or 32-bit PowerPC etc), then the compiled binary application can run even if two different Linux distributions are installed. A problem can be some missing shared libraries. You can bypass this by creating an application that uses static libraries when compiled.

Linux Archive

Last edited by seraphim172; 06-25-2008 at 05:38 AM.


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
COmputer crashes when copying files ApAdrian Linux - Networking 1 06-25-2007 10:30 AM
Copying music to computer from a CD (sorry im retarded) SRTTurbo Linux - Software 2 06-06-2006 03:30 PM
what is a.out means...when we compiled C program indian Programming 8 09-17-2004 02:32 AM
copying files from another computer(win) lin00b Linux - Newbie 5 07-27-2004 04:53 AM
how to run C++ compiled program legend1079 Linux - Newbie 2 03-20-2004 07:40 AM > Forums > Linux Forums > Linux - Newbie

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

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