Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with Including new project's header file

Problem with Including new project's header file

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ashishbhatt 0
    wrote on last edited by
    #1

    Hi All, I am working on win32 application in that solution I have included new project in which I have one header file and I want to include that header file in my win32 application's file(any .h or .cpp). But when I do this I got the error like ...... cannot include file ,no such directory. And also is other project setting which I have to do to include this new project's file into my other project. If you have any suggetion?? Thanks.

    Ashish Bhatt

    P R 2 Replies Last reply
    0
    • A ashishbhatt 0

      Hi All, I am working on win32 application in that solution I have included new project in which I have one header file and I want to include that header file in my win32 application's file(any .h or .cpp). But when I do this I got the error like ...... cannot include file ,no such directory. And also is other project setting which I have to do to include this new project's file into my other project. If you have any suggetion?? Thanks.

      Ashish Bhatt

      P Offline
      P Offline
      Paresh Chitte
      wrote on last edited by
      #2

      Have you specified the relative path of the header file while including. You can also specify the addition include directoryies. In VS2005 go to, Project | Properties | Configuration Properties | C/C++ | General | Additional Include Directories. Regards, Paresh.

      A 1 Reply Last reply
      0
      • A ashishbhatt 0

        Hi All, I am working on win32 application in that solution I have included new project in which I have one header file and I want to include that header file in my win32 application's file(any .h or .cpp). But when I do this I got the error like ...... cannot include file ,no such directory. And also is other project setting which I have to do to include this new project's file into my other project. If you have any suggetion?? Thanks.

        Ashish Bhatt

        R Offline
        R Offline
        richardye
        wrote on last edited by
        #3

        First, check the position of that header file, I suggest you use full path in your include sentence. If it doesn't work. In Microsoft Visual Visual Stdio .Net, choose [TOOL]->[OPTION]->[PROJECT]->[VC++ DIRECTORY]->[INCLUDE FILE], select the header file you want to include, then rebuild your whole project. Sometimes, you have to close the VC, and then open it. Tomorrow it another day.

        A 1 Reply Last reply
        0
        • P Paresh Chitte

          Have you specified the relative path of the header file while including. You can also specify the addition include directoryies. In VS2005 go to, Project | Properties | Configuration Properties | C/C++ | General | Additional Include Directories. Regards, Paresh.

          A Offline
          A Offline
          ashishbhatt 0
          wrote on last edited by
          #4

          Ya I have tried as you told it gave me the same error. I have include lilke below ./omnithread into Additional Include Directories in my old project. And also here omnithread is the new added project and it is of Static Library (.lib) type. Is there any suggetion??

          Ashish Bhatt

          1 Reply Last reply
          0
          • R richardye

            First, check the position of that header file, I suggest you use full path in your include sentence. If it doesn't work. In Microsoft Visual Visual Stdio .Net, choose [TOOL]->[OPTION]->[PROJECT]->[VC++ DIRECTORY]->[INCLUDE FILE], select the header file you want to include, then rebuild your whole project. Sometimes, you have to close the VC, and then open it. Tomorrow it another day.

            A Offline
            A Offline
            ashishbhatt 0
            wrote on last edited by
            #5

            Thanks for reply. Now Let me explain more about my problem. I have included the project omnithread in which i have one header file omnithread.h (I hope you know about this file).Now I want to use this header file into my current project,so I included it into my file like #include "omnithread\omnithread.h".And If I compile then it gives me the error like... fatal error C1189: #error : "No implementation header file" Now in omnithread.h file I have code like this in the starting....... #elif defined(__SINIX__) #include #elif defined(__osr5__) #include #elif defined(__irix__) #include #else #error "No implementation header file" // I hope error comes from here:(( #endif I hope you will understand the problem. If you have idea then reply me. Thanks.

            Ashish Bhatt

            R 1 Reply Last reply
            0
            • A ashishbhatt 0

              Thanks for reply. Now Let me explain more about my problem. I have included the project omnithread in which i have one header file omnithread.h (I hope you know about this file).Now I want to use this header file into my current project,so I included it into my file like #include "omnithread\omnithread.h".And If I compile then it gives me the error like... fatal error C1189: #error : "No implementation header file" Now in omnithread.h file I have code like this in the starting....... #elif defined(__SINIX__) #include #elif defined(__osr5__) #include #elif defined(__irix__) #include #else #error "No implementation header file" // I hope error comes from here:(( #endif I hope you will understand the problem. If you have idea then reply me. Thanks.

              Ashish Bhatt

              R Offline
              R Offline
              richardye
              wrote on last edited by
              #6

              As you have explained above, you mean you have included the head file "omnithread.h" correctly. May be you haven't defined the preprocess macro such as "__SINIX__", "__osr5__", "__irix__", so error "No implementation header file" occurs. Tommorrow is another day.

              A 1 Reply Last reply
              0
              • R richardye

                As you have explained above, you mean you have included the head file "omnithread.h" correctly. May be you haven't defined the preprocess macro such as "__SINIX__", "__osr5__", "__irix__", so error "No implementation header file" occurs. Tommorrow is another day.

                A Offline
                A Offline
                ashishbhatt 0
                wrote on last edited by
                #7

                Thanks for reply. As you told that preprocesser macro may not be defined i tried to see its defination but it shows it is not defined.But the same other project is running by doing the same thing and it doesn,t give error to it.But I am doing the same thing and it gives me the error. The diff is only that I include header file like #include "omnithread\omnithread.h" and in other project it is like #include. If any other suggetion then reply.I will appreciate your answer. Thanks.

                Ashish Bhatt

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups