Thread: How Do C Cope with more than one mian()'s compiling task?

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    2

    Question How Do C Cope with more than one mian()'s compiling task?

    Hey, all!

    I am totally new in the world of C!
    Recently, I got a bunch of C source codes of an application and need to find a way to read it.
    I start from readme file, then some *.vcproj files, later on I read Makefile.nmake.
    I do know that in order to read the codes, I need to find the main() first, and I got them easily (lucky~).
    However, I found more than one main() which is reasonable, as a big application may have several *.exe files too.
    But I do get confused, since I am not sure what is the actually "starting point" of all the codes.

    Do someone know how this will be done by compiler, or some reccomended reading materials will be appreciated!

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    One program only has one main(), so if it has multiple main()'s, they must be the starting point of multiple programs (*.exe). They would be separate programs.

  3. #3
    Registered User
    Join Date
    Feb 2013
    Posts
    2
    Quote Originally Posted by cyberfish View Post
    One program only has one main(), so if it has multiple main()'s, they must be the starting point of multiple programs (*.exe). They would be separate programs.
    UR right!
    But most of the applications are sets of multiple programs, right?
    When I start a *.exe, I may see a GUI panel with buttons by which I can call other programs
    How does these programs cooperates with each other then?
    Especially, in some cases there are no buttions, my guess is that programs may be called by Shell.
    Is it a good guess then ?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help from the task
    By MAJA83 in forum C Programming
    Replies: 1
    Last Post: 06-06-2012, 11:35 AM
  2. crosslist to cope with sparse matrix
    By kiss in forum C Programming
    Replies: 2
    Last Post: 12-28-2009, 11:59 PM
  3. Compiling in Windows (Supreme infernal task)
    By NeMewSys in forum C++ Programming
    Replies: 11
    Last Post: 05-22-2008, 03:41 PM
  4. Replies: 2
    Last Post: 12-31-2007, 11:40 AM
  5. Look it i can't cope....
    By planet_abhi in forum Game Programming
    Replies: 0
    Last Post: 12-10-2003, 07:28 AM