Thread: Makefile help

  1. #16
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes. It looks correct.

    Of course, most often, more than one function (if there are several functions that belong together) is declared in the .h file and defined in the .c file.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  2. #17
    Registered User
    Join Date
    Nov 2008
    Posts
    56
    Excellent. Thanks for the help.

  3. #18
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    Quote Originally Posted by swappo View Post
    okay, I edited my last post to reflect combine2.c.

    Am I correct in this statement? If so, I think I now have a handle on things.
    Looks correct to me. If you have a function that's defined in one source file, but/also used in another, you should put the declaration in a common header file.

    QuantumPete
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile Problem: None rule to make target
    By chris24300 in forum Linux Programming
    Replies: 25
    Last Post: 06-17-2009, 09:45 AM
  2. Building a project using a Makefile
    By starcatcher in forum Windows Programming
    Replies: 2
    Last Post: 11-23-2008, 11:50 PM
  3. unix makefile won't work but works in Dev C++
    By jk1998 in forum C++ Programming
    Replies: 1
    Last Post: 06-09-2007, 03:54 PM
  4. makefile blues....
    By WaterNut in forum C Programming
    Replies: 6
    Last Post: 05-30-2005, 08:22 PM
  5. Need help with Makefile
    By xshapirox in forum C++ Programming
    Replies: 14
    Last Post: 09-28-2004, 03:32 PM