Thread: Multiple Files
View Single Post
  #3   Spotlight this post!  
Unread 29-03-2005, 11:14
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: Multiple Files

Quote:
Originally Posted by Ewilliams2006
Since the default code is made of multiple files, it requires a specific linking script, correct? I am a programmer that can make simple VB, C, C++, and Java programs work but I don't understand much about coding theory. Can anyone explain what the benefit of multiple files is?

Along that same line, the linker provides a way for a method in one file call a method in another file, right? How are these linking scripts made?

Any answer would be greatly appreciated.
Thanks in advance,
Eric
Linkers do just as they are named, they link together different files and create an file able to be executed.
They take libraries that you included with the linker script (or the command line), and connect the code so that calls that you make to functions outside of each file actually call the right function and do not call nothing.
They also take each of the object files that was created from the compiler, and connects them in a similar fashion to what was done for the libraries.
And like 'dm0ney' said, more files = more organization, and easier to spread the code to multiple people.
And you do not need a linker script for most linkers.... you can generally just place the files you want to link into the command line... I believe that is what the Microchip IDE does... although I would have to check when I have that available to me.
__________________
- from B B frank