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

This is a discussion on How Do C Cope with more than one mian()'s compiling task? within the C Programming forums, part of the General Programming Boards category; Hey, all! I am totally new in the world of C! Recently, I got a bunch of C source codes ...

  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,171
    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, 10: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, 10:40 AM
  5. Look it i can't cope....
    By planet_abhi in forum Game Programming
    Replies: 0
    Last Post: 12-10-2003, 06:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21