Thread: header files

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    21

    header files

    I have a trivial question.

    I have 10 modules using a .h file.
    if I change a value in the .h file that these modules are using, and then compile one of the 10 modules, then only that module will pick up the new value in the .h file. Am I right?

    so, for the new change to reflect everywhere, do I have to compile all the 10 modules?

    RN

  2. #2
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Yes you have to.
    But usually this problem is solved by the dependencies in your build-system.
    Kurt

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    21
    Dependencies in the system? I dont exactly understand you.

  4. #4
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    If you use an IDE it calls some buildsystem ( like make ) to build your project. If you add the header to the dependancies (spelling ?? ) of each of your source files then all files will be compiled automatically if you build your project and the header has changed.
    Kurt

  5. #5
    Registered User
    Join Date
    Sep 2005
    Posts
    21
    I got you now. Thanks a lot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. #include header files or .cpp files?
    By DoctorX in forum C++ Programming
    Replies: 3
    Last Post: 12-23-2006, 12:21 PM
  3. classes and header files
    By Drake in forum C++ Programming
    Replies: 8
    Last Post: 11-30-2006, 07:12 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM