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. NMAKE can't find include file in subfolder -- SOLVED

NMAKE can't find include file in subfolder -- SOLVED

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studioalgorithmshelpquestion
15 Posts 5 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 Alan Balkany

    Using Microsoft's NMAKE with -I option for include paths. It works for the include files in these folders, but can't seem to find one in a named subfolder: Here's the resulting command & error message:

    cl /nologo /Ox /MD /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE -I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys"; -I. "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include" -DAVOID_WIN32_FILEIO -DCHECK_JPEG_YCBCR_SUBSAMPLING -DDEFAULT_EXTRASAMPLE_AS_ALPHA -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=8192 -DLOGLUV_SUPPORT -DNEXT_SUPPORT -DTHUNDER_SUPPORT -DLZW_SUPPORT -DPACKBITS_SUPPORT -DCCITT_SUPPORT -DTIF_PLATFORM_CONSOLE -DFILLODER_LSB2MSB /c tif_unix.c tif_unix.c tif_unix.c(35) : fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory

    Two things to note: 1. The "missing" file, "types.h", IS in the "sys" subfolder of one of the include paths, so "sys/types.h" should have been found, and 2. The "sys" subfolder was also included (out of desperation) and types.h STILL wasn't found. Any ideas why this include file can't be found?

    "Microsoft -- Adding unnecessary complexity to your work since 1987!"

    CPalliniC Offline
    CPalliniC Offline
    CPallini
    wrote on last edited by
    #3

    Isn't sys/types.h a POSIX include file? Can you use it on Windows (I mean without Cygwin)?

    Veni, vidi, vici.

    In testa che avete, signor di Ceprano?

    L 1 Reply Last reply
    0
    • A Alan Balkany

      Using Microsoft's NMAKE with -I option for include paths. It works for the include files in these folders, but can't seem to find one in a named subfolder: Here's the resulting command & error message:

      cl /nologo /Ox /MD /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE -I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys"; -I. "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include" -DAVOID_WIN32_FILEIO -DCHECK_JPEG_YCBCR_SUBSAMPLING -DDEFAULT_EXTRASAMPLE_AS_ALPHA -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=8192 -DLOGLUV_SUPPORT -DNEXT_SUPPORT -DTHUNDER_SUPPORT -DLZW_SUPPORT -DPACKBITS_SUPPORT -DCCITT_SUPPORT -DTIF_PLATFORM_CONSOLE -DFILLODER_LSB2MSB /c tif_unix.c tif_unix.c tif_unix.c(35) : fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory

      Two things to note: 1. The "missing" file, "types.h", IS in the "sys" subfolder of one of the include paths, so "sys/types.h" should have been found, and 2. The "sys" subfolder was also included (out of desperation) and types.h STILL wasn't found. Any ideas why this include file can't be found?

      "Microsoft -- Adding unnecessary complexity to your work since 1987!"

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

      If we break this command into its constituent parts we get the following:

      cl /nologo
      /Ox
      /MD
      /EHsc
      /W3
      /D_CRT_SECURE_NO_DEPRECATE
      -I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys";
      -I.
      "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys"
      "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"
      "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
      -DAVOID_WIN32_FILEIO
      -DCHECK_JPEG_YCBCR_SUBSAMPLING
      -DDEFAULT_EXTRASAMPLE_AS_ALPHA
      -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP
      -DSTRIP_SIZE_DEFAULT=8192
      -DLOGLUV_SUPPORT
      -DNEXT_SUPPORT
      -DTHUNDER_SUPPORT
      -DLZW_SUPPORT
      -DPACKBITS_SUPPORT
      -DCCITT_SUPPORT
      -DTIF_PLATFORM_CONSOLE
      -DFILLODER_LSB2MSB
      /c
      tif_unix.c
      tif_unix.c
      tif_unix.c

      (35) : fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory

      The only directories included by the -I option are "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys" and . (dot). All the other directory names seem to be orphaned in the command line. I'm also not sure why "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys" has that semi-colon character after it. I think you need to check your NMAKE source file.

      Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

      A 1 Reply Last reply
      0
      • CPalliniC CPallini

        Isn't sys/types.h a POSIX include file? Can you use it on Windows (I mean without Cygwin)?

        Veni, vidi, vici.

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

        I just checked - it is in the Windows sys directory.

        Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

        1 Reply Last reply
        0
        • A Alan Balkany

          Using Microsoft's NMAKE with -I option for include paths. It works for the include files in these folders, but can't seem to find one in a named subfolder: Here's the resulting command & error message:

          cl /nologo /Ox /MD /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE -I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys"; -I. "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include" -DAVOID_WIN32_FILEIO -DCHECK_JPEG_YCBCR_SUBSAMPLING -DDEFAULT_EXTRASAMPLE_AS_ALPHA -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=8192 -DLOGLUV_SUPPORT -DNEXT_SUPPORT -DTHUNDER_SUPPORT -DLZW_SUPPORT -DPACKBITS_SUPPORT -DCCITT_SUPPORT -DTIF_PLATFORM_CONSOLE -DFILLODER_LSB2MSB /c tif_unix.c tif_unix.c tif_unix.c(35) : fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory

          Two things to note: 1. The "missing" file, "types.h", IS in the "sys" subfolder of one of the include paths, so "sys/types.h" should have been found, and 2. The "sys" subfolder was also included (out of desperation) and types.h STILL wasn't found. Any ideas why this include file can't be found?

          "Microsoft -- Adding unnecessary complexity to your work since 1987!"

          B Offline
          B Offline
          bjorn_ht
          wrote on last edited by
          #6

          Maybe it's a copy/paste bug but that command line doesn't look right to me. 1. The second include is given with option "-I.", that dot doesn't belong there. 2. The rest of the include paths are given without -I arg so the compiler probably won't know what to do with those.

          L A 2 Replies Last reply
          0
          • B bjorn_ht

            Maybe it's a copy/paste bug but that command line doesn't look right to me. 1. The second include is given with option "-I.", that dot doesn't belong there. 2. The rest of the include paths are given without -I arg so the compiler probably won't know what to do with those.

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

            1. That just means add the current directory to the include path(s). 2. I already noted this in my comment above.

            Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

            B 1 Reply Last reply
            0
            • L Lost User

              1. That just means add the current directory to the include path(s). 2. I already noted this in my comment above.

              Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

              B Offline
              B Offline
              bjorn_ht
              wrote on last edited by
              #8

              1. Yes that could be the intention, but the compiler would look there in any case, wouldn't it? 2. So then we know it took me more than 36 minutes to type in that comment. No wonder I'm not a regular...

              L 1 Reply Last reply
              0
              • B bjorn_ht

                1. Yes that could be the intention, but the compiler would look there in any case, wouldn't it? 2. So then we know it took me more than 36 minutes to type in that comment. No wonder I'm not a regular...

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

                1. Not all compilers do that automatically. As far as I recall some flavours of UNIX require this. 2. Apologies, I did not check the time differences.

                Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

                B 1 Reply Last reply
                0
                • L Lost User

                  1. Not all compilers do that automatically. As far as I recall some flavours of UNIX require this. 2. Apologies, I did not check the time differences.

                  Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

                  B Offline
                  B Offline
                  bjorn_ht
                  wrote on last edited by
                  #10

                  1. Oh absolutely, 2. you were right, though.

                  1 Reply Last reply
                  0
                  • L Lost User

                    If we break this command into its constituent parts we get the following:

                    cl /nologo
                    /Ox
                    /MD
                    /EHsc
                    /W3
                    /D_CRT_SECURE_NO_DEPRECATE
                    -I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys";
                    -I.
                    "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys"
                    "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"
                    "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
                    -DAVOID_WIN32_FILEIO
                    -DCHECK_JPEG_YCBCR_SUBSAMPLING
                    -DDEFAULT_EXTRASAMPLE_AS_ALPHA
                    -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP
                    -DSTRIP_SIZE_DEFAULT=8192
                    -DLOGLUV_SUPPORT
                    -DNEXT_SUPPORT
                    -DTHUNDER_SUPPORT
                    -DLZW_SUPPORT
                    -DPACKBITS_SUPPORT
                    -DCCITT_SUPPORT
                    -DTIF_PLATFORM_CONSOLE
                    -DFILLODER_LSB2MSB
                    /c
                    tif_unix.c
                    tif_unix.c
                    tif_unix.c

                    (35) : fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory

                    The only directories included by the -I option are "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys" and . (dot). All the other directory names seem to be orphaned in the command line. I'm also not sure why "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys" has that semi-colon character after it. I think you need to check your NMAKE source file.

                    Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

                    A Offline
                    A Offline
                    Alan Balkany
                    wrote on last edited by
                    #11

                    You nailed it Richard! That was the problem! Many thanks (and 5 points)!

                    "Microsoft -- Adding unnecessary complexity to your work since 1987!"

                    L 1 Reply Last reply
                    0
                    • B bjorn_ht

                      Maybe it's a copy/paste bug but that command line doesn't look right to me. 1. The second include is given with option "-I.", that dot doesn't belong there. 2. The rest of the include paths are given without -I arg so the compiler probably won't know what to do with those.

                      A Offline
                      A Offline
                      Alan Balkany
                      wrote on last edited by
                      #12

                      That was the problem (as Richard also pointed out). Thanks and 5 points!

                      "Microsoft -- Adding unnecessary complexity to your work since 1987!"

                      1 Reply Last reply
                      0
                      • D David Crow

                        I haven't messed with make files in a very long time, but it seems that the preprocessor is going to look in the following folders for sys/types.h:

                        "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys"
                        "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys"
                        "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"
                        "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"

                        Of the above, only the last one would appear to contain a folder named sys, correct? Does the \ vs. / make any difference? I don't think it does, but I just wanted to mention it.

                        "One man's wage rise is another man's price increase." - Harold Wilson

                        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                        A Offline
                        A Offline
                        Alan Balkany
                        wrote on last edited by
                        #13

                        Thanks for the info, but the problem turned out to be something else.

                        "Microsoft -- Adding unnecessary complexity to your work since 1987!"

                        D 1 Reply Last reply
                        0
                        • A Alan Balkany

                          Thanks for the info, but the problem turned out to be something else.

                          "Microsoft -- Adding unnecessary complexity to your work since 1987!"

                          D Offline
                          D Offline
                          David Crow
                          wrote on last edited by
                          #14

                          I suspected it was after reading Richard's post.

                          "One man's wage rise is another man's price increase." - Harold Wilson

                          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                          1 Reply Last reply
                          0
                          • A Alan Balkany

                            You nailed it Richard! That was the problem! Many thanks (and 5 points)!

                            "Microsoft -- Adding unnecessary complexity to your work since 1987!"

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

                            :thumbsup:

                            Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

                            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