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. Now none of my .h header file changes seem to take

Now none of my .h header file changes seem to take

Scheduled Pinned Locked Moved C / C++ / MFC
help
18 Posts 4 Posters 1 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.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    I am trying to reference a member of Derived CDialog and am getting an intelligence error not defined it is #included in the file when I copy the actual class and members to the source file it is able to reference them seem like changes to my headers arent taking thanks

    L 1 Reply Last reply
    0
    • F ForNow

      I am trying to reference a member of Derived CDialog and am getting an intelligence error not defined it is #included in the file when I copy the actual class and members to the source file it is able to reference them seem like changes to my headers arent taking thanks

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It sounds like something is messed up in your project. Your source files should be dependent on all the associated headers, and if a header changes then the sources should be rebuilt. You need to look at the project settings for all the source files.

      F 1 Reply Last reply
      0
      • L Lost User

        It sounds like something is messed up in your project. Your source files should be dependent on all the associated headers, and if a header changes then the sources should be rebuilt. You need to look at the project settings for all the source files.

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        Richard you are right I copied a .cpp and .h from another project instead of instead of going to Add --> exiting item I guess I should delete and recopy ? I mean copy a copy to another directory and then delete and then do add -> resource item thanks again

        V 1 Reply Last reply
        0
        • F ForNow

          Richard you are right I copied a .cpp and .h from another project instead of instead of going to Add --> exiting item I guess I should delete and recopy ? I mean copy a copy to another directory and then delete and then do add -> resource item thanks again

          V Offline
          V Offline
          Victor Nijegorodov
          wrote on last edited by
          #4

          NO need to delete! Just Add the existing (file that you have already copied!)

          F 1 Reply Last reply
          0
          • V Victor Nijegorodov

            NO need to delete! Just Add the existing (file that you have already copied!)

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            that updates the project file thanks maybe I can try that for resource.h as well ?

            L 1 Reply Last reply
            0
            • F ForNow

              that updates the project file thanks maybe I can try that for resource.h as well ?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Yes, you should ensure that all files are in the Project tree that is displayed in Visual Studio. If they are not included in the actual Project then Visual Studio will not be aware of them.

              F 1 Reply Last reply
              0
              • L Lost User

                Yes, you should ensure that all files are in the Project tree that is displayed in Visual Studio. If they are not included in the actual Project then Visual Studio will not be aware of them.

                F Offline
                F Offline
                ForNow
                wrote on last edited by
                #7

                I think I’m going to do add—> existing items (.cpp and .h) in all my files that should update the project settings Thanks

                L 1 Reply Last reply
                0
                • F ForNow

                  I think I’m going to do add—> existing items (.cpp and .h) in all my files that should update the project settings Thanks

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  You only need to add the ones that are missing.

                  F 1 Reply Last reply
                  0
                  • L Lost User

                    You only need to add the ones that are missing.

                    F Offline
                    F Offline
                    ForNow
                    wrote on last edited by
                    #9

                    Does it hurt to do them all seems like it would refresh my project settings Thanks

                    L Richard Andrew x64R 2 Replies Last reply
                    0
                    • F ForNow

                      Does it hurt to do them all seems like it would refresh my project settings Thanks

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      I am not sure what happens if you add one that is already included. Try it on a single file just to check.

                      1 Reply Last reply
                      0
                      • F ForNow

                        Does it hurt to do them all seems like it would refresh my project settings Thanks

                        Richard Andrew x64R Online
                        Richard Andrew x64R Online
                        Richard Andrew x64
                        wrote on last edited by
                        #11

                        If you attempt to add a file that already exists in the project, Visual Studio will simply ignore the command silently. This means that you can select all the files in the folder to add, and Visual Studio will sort out which ones already exist in the project.

                        The difficult we do right away... ...the impossible takes slightly longer.

                        F 1 Reply Last reply
                        0
                        • Richard Andrew x64R Richard Andrew x64

                          If you attempt to add a file that already exists in the project, Visual Studio will simply ignore the command silently. This means that you can select all the files in the folder to add, and Visual Studio will sort out which ones already exist in the project.

                          The difficult we do right away... ...the impossible takes slightly longer.

                          F Offline
                          F Offline
                          ForNow
                          wrote on last edited by
                          #12

                          That means I take my the .cpp that’s giving me issues copy it somewhere use to VS to remove / delete Then paste back to the folder have VS add —> existing item ?

                          L 1 Reply Last reply
                          0
                          • F ForNow

                            That means I take my the .cpp that’s giving me issues copy it somewhere use to VS to remove / delete Then paste back to the folder have VS add —> existing item ?

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #13

                            You do not need to move it anywhere; just add it back in to the project. Once you have all the files correctly included in the project you can rebuild it and start looking at any residual errors. Note: adding files into a project does not move them physically, it just builds a list in the Visual Studio Project settings.

                            F 1 Reply Last reply
                            0
                            • L Lost User

                              You do not need to move it anywhere; just add it back in to the project. Once you have all the files correctly included in the project you can rebuild it and start looking at any residual errors. Note: adding files into a project does not move them physically, it just builds a list in the Visual Studio Project settings.

                              F Offline
                              F Offline
                              ForNow
                              wrote on last edited by
                              #14

                              I tried that didn’t pick up my changes don’t think there is anybharm in remove / delete and then pasting and add / existing Thank.

                              L 1 Reply Last reply
                              0
                              • F ForNow

                                I tried that didn’t pick up my changes don’t think there is anybharm in remove / delete and then pasting and add / existing Thank.

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #15

                                It's a waste of time. If it does not correctly add the files that are already present, then removing and restoring them will make no difference. Unfortunately we cannot see your system so cannot be certain if there is something else missing from your project settings. If you could post your .vxproj and .vxproj,filters files from the project folder, we may be able to spot something.

                                F 1 Reply Last reply
                                0
                                • L Lost User

                                  It's a waste of time. If it does not correctly add the files that are already present, then removing and restoring them will make no difference. Unfortunately we cannot see your system so cannot be certain if there is something else missing from your project settings. If you could post your .vxproj and .vxproj,filters files from the project folder, we may be able to spot something.

                                  F Offline
                                  F Offline
                                  ForNow
                                  wrote on last edited by
                                  #16

                                  thanks for the offer but looks too big of a job here is the project below is the filters maybe if takes a few minutes thanks Debug Win32 Release Win32 Debug x64 Release x64 16.0 {78197285-AA04-442D-9595-B4B8F59B97DF} MFCProj DriveStorage 10.0 Application true v142 Unicode Dynamic Application false v142 true Unicode Dynamic Application true v142 Unicode Dynamic

                                  L 1 Reply Last reply
                                  0
                                  • F ForNow

                                    thanks for the offer but looks too big of a job here is the project below is the filters maybe if takes a few minutes thanks Debug Win32 Release Win32 Debug x64 Release x64 16.0 {78197285-AA04-442D-9595-B4B8F59B97DF} MFCProj DriveStorage 10.0 Application true v142 Unicode Dynamic Application false v142 true Unicode Dynamic Application true v142 Unicode Dynamic

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #17

                                    It looks OK, assuming the list contains all of the files you expect to be included. However, I notice you have two versions of two source and header files: CModalStorage and CStorge, and wonder if that is a cause of confusion.

                                    F 1 Reply Last reply
                                    0
                                    • L Lost User

                                      It looks OK, assuming the list contains all of the files you expect to be included. However, I notice you have two versions of two source and header files: CModalStorage and CStorge, and wonder if that is a cause of confusion.

                                      F Offline
                                      F Offline
                                      ForNow
                                      wrote on last edited by
                                      #18

                                      Thanks Richard I got rid of it have to fix up a few other things thank you

                                      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