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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. cannot open include file 'atlres.h'

cannot open include file 'atlres.h'

Scheduled Pinned Locked Moved ATL / WTL / STL
helpc++question
15 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.
  • J Offline
    J Offline
    josip cagalj
    wrote on last edited by
    #1

    Hi to all. I'm trying to open some project wroted using WTL. When I try to rebuild it (using VS2008 on Win XP) I get the compile error as above. Now, "atlres.h" file is in directory which I added to my project settings properly and I don't know why error appears!? The message states "cannot open.." which means it has no trouble locating it? but rather cant open it? Please help! Thanks in advance.

    S 1 Reply Last reply
    0
    • J josip cagalj

      Hi to all. I'm trying to open some project wroted using WTL. When I try to rebuild it (using VS2008 on Win XP) I get the compile error as above. Now, "atlres.h" file is in directory which I added to my project settings properly and I don't know why error appears!? The message states "cannot open.." which means it has no trouble locating it? but rather cant open it? Please help! Thanks in advance.

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      I think you need to add the WTL include directory to the include directory path for the resource compiler. Right-click on the project, select 'Properties', select Resources->General in the properties window and add the WTL include directory to Additional Include Directories.

      J 1 Reply Last reply
      0
      • S Stuart Dootson

        I think you need to add the WTL include directory to the include directory path for the resource compiler. Right-click on the project, select 'Properties', select Resources->General in the properties window and add the WTL include directory to Additional Include Directories.

        J Offline
        J Offline
        josip cagalj
        wrote on last edited by
        #3

        Thanks for replaying to me. I already have directory path (D:\...\WTL80\include) included in Aditional Include Directories. ?

        S 1 Reply Last reply
        0
        • J josip cagalj

          Thanks for replaying to me. I already have directory path (D:\...\WTL80\include) included in Aditional Include Directories. ?

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          In the Additional Include Directories for the resource compiler? I'm NOT talking about the C++ compiler options...

          J 2 Replies Last reply
          0
          • S Stuart Dootson

            In the Additional Include Directories for the resource compiler? I'm NOT talking about the C++ compiler options...

            J Offline
            J Offline
            josip cagalj
            wrote on last edited by
            #5

            In 'MyProgram' Property Pages under C/C++ General Additional Include Directories.

            1 Reply Last reply
            0
            • S Stuart Dootson

              In the Additional Include Directories for the resource compiler? I'm NOT talking about the C++ compiler options...

              J Offline
              J Offline
              josip cagalj
              wrote on last edited by
              #6

              OK I got you. Stop complaining about that. Thanks big time! Now I get: "fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib'" ?

              S 1 Reply Last reply
              0
              • J josip cagalj

                OK I got you. Stop complaining about that. Thanks big time! Now I get: "fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib'" ?

                S Offline
                S Offline
                Stuart Dootson
                wrote on last edited by
                #7

                That's a completely different matter - if you really need DNSAPI.lib, what I'd do is open a Command Prompt window, and execute the following commands: CD /d "c:\Program Files" dir /s/b dnsapi.lib It might take a while to run, probably, but it'll likely find any DNSAPI.lib you have. On my machine, I get the following output:

                C:\Program Files\Microsoft SDKs\Windows\v5.0\Lib\IA64\DnsAPI.Lib
                C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\DnsAPI.Lib
                C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\DnsAPI.Lib
                C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\DnsAPI.Lib
                C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\IA64\DnsAPI.Lib
                C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\x64\DnsAPI.Lib
                C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib\DnsAPI.Lib
                C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib\DnsAPI.Lib
                C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib\AMD64\DnsAPI.Lib

                You can see that (for some reason - I don't know why!) I only have Itanium libraries under C:\Program Files\Microsoft SDKs\Windows\v5.0.

                J 1 Reply Last reply
                0
                • S Stuart Dootson

                  That's a completely different matter - if you really need DNSAPI.lib, what I'd do is open a Command Prompt window, and execute the following commands: CD /d "c:\Program Files" dir /s/b dnsapi.lib It might take a while to run, probably, but it'll likely find any DNSAPI.lib you have. On my machine, I get the following output:

                  C:\Program Files\Microsoft SDKs\Windows\v5.0\Lib\IA64\DnsAPI.Lib
                  C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\DnsAPI.Lib
                  C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\DnsAPI.Lib
                  C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\DnsAPI.Lib
                  C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\IA64\DnsAPI.Lib
                  C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib\x64\DnsAPI.Lib
                  C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib\DnsAPI.Lib
                  C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib\DnsAPI.Lib
                  C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib\AMD64\DnsAPI.Lib

                  You can see that (for some reason - I don't know why!) I only have Itanium libraries under C:\Program Files\Microsoft SDKs\Windows\v5.0.

                  J Offline
                  J Offline
                  josip cagalj
                  wrote on last edited by
                  #8

                  Is there any way you can get him to take another one, like second from v6.0A for example?

                  S 1 Reply Last reply
                  0
                  • J josip cagalj

                    Is there any way you can get him to take another one, like second from v6.0A for example?

                    S Offline
                    S Offline
                    Stuart Dootson
                    wrote on last edited by
                    #9

                    Yes - in the project properties, under 'Linker', you can tell the linker what directories to look in. Alternatively, you can add them under Tools->Options, somewhere near the place where you can say what C++ include directories to use.

                    J 1 Reply Last reply
                    0
                    • S Stuart Dootson

                      Yes - in the project properties, under 'Linker', you can tell the linker what directories to look in. Alternatively, you can add them under Tools->Options, somewhere near the place where you can say what C++ include directories to use.

                      J Offline
                      J Offline
                      josip cagalj
                      wrote on last edited by
                      #10

                      Tried it in both places but still no improvement (in tools options even when I pull it up at the top of list)! Error:"fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib'" But big thanks for you anyway.

                      S 1 Reply Last reply
                      0
                      • J josip cagalj

                        Tried it in both places but still no improvement (in tools options even when I pull it up at the top of list)! Error:"fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib'" But big thanks for you anyway.

                        S Offline
                        S Offline
                        Stuart Dootson
                        wrote on last edited by
                        #11

                        Sounds like something has the whole of that path hard-coded. There might (might!) be a #pragma comment(lib, "C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib") somewhere in your code or the code you #include?

                        J 1 Reply Last reply
                        0
                        • S Stuart Dootson

                          Sounds like something has the whole of that path hard-coded. There might (might!) be a #pragma comment(lib, "C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib") somewhere in your code or the code you #include?

                          J Offline
                          J Offline
                          josip cagalj
                          wrote on last edited by
                          #12

                          I agree it looks like hard-coded line of code because no meter what directory path I add, both in 'project property->linker->additional library directories' or 'tools->options->VC++directories(under library files)' I'm getting the same error: "LINK: fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib'"! But can't find where in my code I'm doing that. I inherited this project from another person and on his machine everything works just fine. ???

                          J 1 Reply Last reply
                          0
                          • J josip cagalj

                            I agree it looks like hard-coded line of code because no meter what directory path I add, both in 'project property->linker->additional library directories' or 'tools->options->VC++directories(under library files)' I'm getting the same error: "LINK: fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib'"! But can't find where in my code I'm doing that. I inherited this project from another person and on his machine everything works just fine. ???

                            J Offline
                            J Offline
                            josip cagalj
                            wrote on last edited by
                            #13

                            Problems are solved, I get the project working! Thanks for helping me around! If I have any future question al be sure to post it here. Once again thanks!

                            B 1 Reply Last reply
                            0
                            • J josip cagalj

                              Problems are solved, I get the project working! Thanks for helping me around! If I have any future question al be sure to post it here. Once again thanks!

                              B Offline
                              B Offline
                              Binni shah
                              wrote on last edited by
                              #14

                              I am facing the same problem u faced..but i am not getting the solution. the error i got is: fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib' please help me.. thanks in advance..

                              J 1 Reply Last reply
                              0
                              • B Binni shah

                                I am facing the same problem u faced..but i am not getting the solution. the error i got is: fatal error LNK1104: cannot open file 'C:/Program Files/Microsoft SDKs/Windows/v5.0/Lib/DnsAPI.Lib' please help me.. thanks in advance..

                                J Offline
                                J Offline
                                josip cagalj
                                wrote on last edited by
                                #15

                                Hi, it was a long time ago, but if I remember correctly I had to recreate the workarounds (folder states/names/positions) as the person who redistrict this project to me. For example I placed all folders needed in my 'D:\MyProject\...' while on his PC it was placed on 'C:\' drive each folder for himself. I know this may seem odd (especially if you link everything properly ) but it worked. The thing was there was many files to edit and rebuild for things to work this seamed to be the easy way! Best luck to 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