problem with creating .exe file with multiple cpp files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • calvinLYP
    New Member
    • Sep 2007
    • 6

    problem with creating .exe file with multiple cpp files

    hi all,

    i am relatively new to C++ programming.

    i downloaded a program from sourceforge and edited some of its cpp files, i was told that by changing the Makefile i will be able to create a .exe file with the combination of multiple .cpp, .h and .o files.

    may i know how to go about changing the values of the Makefile?

    please find attached documents as the Makefile of the program i downloaded.

    please help and advise
    Attached Files
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by calvinLYP
    hi all,

    i am relatively new to C++ programming.

    i downloaded a program from sourceforge and edited some of its cpp files, i was told that by changing the Makefile i will be able to create a .exe file with the combination of multiple .cpp, .h and .o files.

    may i know how to go about changing the values of the Makefile?

    please find attached documents as the Makefile of the program i downloaded.

    please help and advise
    That's a linker job: a compiler compiles source files and generates object files. A linker reads a bunch of object files (and libraries), links them and generates an executable file. There are no source file or header files in that executable file.

    Header files tell the compiler what functions and data are stored in other object files. Those object files were once compiled (and most likely put in a library, ready to be linked by the linker).

    The 'make' program (or whatever its name is) reads a makefile and automates the entire process of compilation and linkage.

    kind regards,

    Jos

    Comment

    • calvinLYP
      New Member
      • Sep 2007
      • 6

      #3
      Originally posted by JosAH
      That's a linker job: a compiler compiles source files and generates object files. A linker reads a bunch of object files (and libraries), links them and generates an executable file. There are no source file or header files in that executable file.

      The 'make' program (or whatever its name is) reads a makefile and automates the entire process of compilation and linkage.

      kind regards,

      Jos
      hi Jos,

      is it to say that once i re-make the package again it will regenerate the new .exe file?

      as in
      1. /configure'

      2. `make'

      3. Type `make install' to install the programs and any data files and
      documentation.

      is it?

      Comment

      Working...