Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 09-21-2007, 03:54 AM   #1 (permalink)
 
Junior Techie

Join Date: Sep 2004

Posts: 53

ModerNietz

Send a message via ICQ to ModerNietz Send a message via Yahoo to ModerNietz
Default Porting

The concept of porting have been keeping confuse me. It is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed. How can it be possible? What makes the C language very portable?
__________________
There are only 10 types of people in the world, those who understand binary and those who do not.
ModerNietz is offline  
Old 09-21-2007, 04:58 PM   #2 (permalink)
void's Avatar
 
True Techie

Join Date: Oct 2005

Posts: 198

void

Default Re: Porting

For example you have a program that runs on Windows, but you want to port it to Linux. Well Linux is a very different environment which means the program will have to linked against different libraries. E.g. For Windows the program may link to kernel32.dll, however that doesn't exist for Linux. There are functions that may be available on windows but not on Linux, and vice versa. Then there is the issue of different locations for libraries etc, and how these locations are specified. For example a path in Windows maybe "C:\Program Files\my_library.dll", however in Linux this would be "/usr/lib/my_library.so". Much of the fundamental code wouldn't change i.e printf() or scanf(), however they have to be linked to different locations.

These are just a couple of issues, but there are many depending on what the program does. Porting for Windows 98 to XP may not involve many changes but from Windows to Linux or Solaris or some other Operating system the change can be many.
void is offline  
Old 09-23-2007, 09:22 PM   #3 (permalink)
 
Junior Techie

Join Date: Sep 2004

Posts: 53

ModerNietz

Send a message via ICQ to ModerNietz Send a message via Yahoo to ModerNietz
Default Re: Porting

Now I have a better understanding. C is relatively portable because its feature relating system makes the code changes less. Now I've got c video player source code for Linux(Suse), How would I make it to be executable?
__________________
There are only 10 types of people in the world, those who understand binary and those who do not.
ModerNietz is offline  
Old 09-23-2007, 09:53 PM   #4 (permalink)
zmatt's Avatar
 
The Bulldog

Join Date: Mar 2006

Location: In an empty Ramen packet

Posts: 4,380

zmatt has a spectacular aura aboutzmatt has a spectacular aura about

Default Re: Porting

If you want really portable code, use Java. The c.lass files will run on any machine with the jvm installed, and there is a jvm for about every modern OS out there.
__________________


ポップ・タルトが大好きです。
<<<<<<<Rep is always welcome
Ultimate Guitar exercises/ Songs for technique
zmatt is offline  
 
Closed Thread

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting a Windows Media Library file (.WMDB) from WMP10 to WMP11 Cunjo Windows Operating Systems and Software 4 07-16-2007 06:42 PM