Thread: Dll Header

  1. #1
    Registered User
    Join Date
    Jul 2008

    Dll Header

     #ifndef _DLL_H_
    #define _DLL_H_
    # define DLLIMPORT __declspec (dllexport)
    #else /* Not BUILDING_DLL */
    # define DLLIMPORT __declspec (dllimport)
    #endif /* Not BUILDING_DLL */
    DLLIMPORT void HelloWorld (void);
    #endif /* _DLL_H_ */
    Here is a standard devc++ header file for a dll.
    What does BUILDING_DLL mean and if I change the name of the header file to loop.h should i change _DLL_H_?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    BUILDING_DLL would (one can presume) be set if the IDE thinks that it's currently building a DLL, as opposed to when it is USING an external DLL.

    It is considered good style to have some sort of relationship between the include guards and the filename [or rather, you don't want "loop.h" to prevent you from including a valid "dll.h" later on in life].

    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.

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. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 02:20 AM
  3. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 12:34 PM
  4. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM