CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    399

    include headers problem

    I don't know how to overcome this issue.

    I am working to a small sub project, part of big project. I intend to use a method which is part of parent project somehow.

    I want to use a method, GetProjectFullPath, which is part of upper level include folder. Fine, I've wrote:

    Code:
    // implementation file
    // MyConfig.cpp
    #include "../../../include/stdutilfuncs.h"
    
    ....
    
    std::string = GetProjectFullPath(...);
    but when I compiling this, I got:
    Code:
      MyConfig.cpp
    c:\home\776\project\include\tools/stacktrace.hpp(3): fatal error C1083: Cannot open include file: 'ie_sutools.h': No such file or directory [C:\Home\776\project\src\my-tinyproject\build\etc ... and so on\my_lib.vcxproj]
    so, in my /stdutilfuncs.h included file there is no ie_sutools.h found. So, how can I solve this without modifying /stdutilfuncs.h header file ?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: include headers problem

    Just copy the GetProjectFullPath declaration and paste it at the begin of your MyConfig.cpp file.
    Victor Nijegorodov

  3. #3
    Join Date
    Jan 2009
    Posts
    399

    Re: include headers problem

    Had worked like a charm ! Thanks a lot !

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: include headers problem

    You are welcome!
    Victor Nijegorodov

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured