how to provide the defines from one header to another?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: how to provide the defines from one header to another?

  1. #1
    Join Date
    Apr 2011
    Posts
    20

    Question how to provide the defines from one header to another?

    Hello,

    I ran into the following problem:
    I have implemented an API, consisting of C-Api, Manager, BaseClass and the concrete working classes derived from the BaseClass. One of this "concrete" class includes the first header file header1.h and loads its .lib file. I can communicate with the concrete Class only via C-Api with the second header file header2.h. Within the concrete class I use the define constants (
    Code:
    #define SOME_CONSTANT
    ) of the header1 without problems. However, if I include the second header into the third one header3.h, then I'm not able to use the defines from the first header anymore.

    Is there a way of solving this problem?


    best regards,

    vanselm
    Last edited by vanselm; May 11th, 2011 at 05:32 AM. Reason: wrong description at first post...

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,466

    Re: how to provide the defines from one header to another?

    Quote Originally Posted by vanselm View Post
    if I include the second header into the third one
    Code:
    header3.h
    , then I'm not able to use the defines from the first header.
    It is not clear how you "included" your heades... however, why not include header1.h into header3.h?
    Victor Nijegorodov

  3. #3
    Join Date
    Apr 2011
    Posts
    20

    Re: how to provide the defines from one header to another?

    I don't want to include header1 into header3 because I would like to separate the class of header3 from the vendor specific API in header1. So that I can use devices of different vendors over my Api in header2. (See my modified problem description in first post)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center