|
-
June 5th, 2006, 12:06 AM
#1
Reading a Large Library or Program
I like to look at source code whenever I can, but I can never figure out where to start. Obviously, the first step is to find main and then read on from there. Libraries are a different story, and I am still not sure where to start reading. Does anyone have any tips for looking over a large library that you have never seen before?
-
June 5th, 2006, 12:32 AM
#2
Re: Reading a Large Library or Program
 Originally Posted by binarybob0001
I like to look at source code whenever I can, but I can never figure out where to start. Obviously, the first step is to find main and then read on from there. Libraries are a different story, and I am still not sure where to start reading. Does anyone have any tips for looking over a large library that you have never seen before?
It's no different than "normal" source code.
The library must have some function that gets called first, second, third, etc. to make the library useful, just as a regular C++ program has a main() function, that calls other functions.
Regards,
Paul McKenzie
-
June 5th, 2006, 02:52 AM
#3
Re: Reading a Large Library or Program
So there is no magic tool that helps you find the first, second and third functions, just hard work?
-
June 5th, 2006, 05:16 AM
#4
Re: Reading a Large Library or Program
 Originally Posted by binarybob0001
So there is no magic tool that helps you find the first, second and third functions, just hard work?
The way you figure out library source code is to look at the sample programs that use the library. That's how you know what function is being called first, second, third, etc.
Just looking at the library code, with no context as to how to call the functions in the library and which functions to call, isn't the way to go about understanding the library.
Regards,
Paul McKenzie
-
June 5th, 2006, 04:05 PM
#5
Re: Reading a Large Library or Program
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|