Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to include include directories when trying to build nmake.
Forum Updated to NodeBB v4.3 + New Features

Unable to include include directories when trying to build nmake.

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 3 Posters 3.4k 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.
  • I Offline
    I Offline
    i773
    wrote on last edited by
    #1

    I'm trying to build Qt with nmake (Windows) but it's not including my include and library flags, it's just saying any lib or source files: "is up-to-date"

    My command:

    nmake 
    -I"sourceFile\Plugin\Common" 
    -I"sourceFile\Plugin\common\includes" 
    -L"sourceFile\Plugin\PICA_SP"
    release
    

    The issue is the source files are not being included in the build, so it tosses the error:

    sourceFile\PhotoshopPlugin.h(3): fatal error C1083: Cannot open include file: 'PIUtilities.h': No such file or directory
    

    But the 'PIUtilities.h' is located in Common.

    -------------------------------------------------

    When I try to include them with this CL command:

    nmake /I\Common /I\includes /I\Photoshop /I\PICA_SP /I\resources /I\sources /L\common /L\sources /L\includes release
    

    I get:
    NMAKE : fatal error U1065: invalid option ' \ '

    Anyone have any ideas?

    K 1 Reply Last reply
    0
    • I i773

      I'm trying to build Qt with nmake (Windows) but it's not including my include and library flags, it's just saying any lib or source files: "is up-to-date"

      My command:

      nmake 
      -I"sourceFile\Plugin\Common" 
      -I"sourceFile\Plugin\common\includes" 
      -L"sourceFile\Plugin\PICA_SP"
      release
      

      The issue is the source files are not being included in the build, so it tosses the error:

      sourceFile\PhotoshopPlugin.h(3): fatal error C1083: Cannot open include file: 'PIUtilities.h': No such file or directory
      

      But the 'PIUtilities.h' is located in Common.

      -------------------------------------------------

      When I try to include them with this CL command:

      nmake /I\Common /I\includes /I\Photoshop /I\PICA_SP /I\resources /I\sources /L\common /L\sources /L\includes release
      

      I get:
      NMAKE : fatal error U1065: invalid option ' \ '

      Anyone have any ideas?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @i773 said in Unable to include include directories when trying to build nmake.:

      My command:

      -L"sourceFile\Plugin\PICA_SP"
      

      Is -L correct or shouldthis be a -I ( capital i )?

      @i773 said in Unable to include include directories when trying to build nmake.:

      When I try to include them with this CL command:

      nmake /I\Common /I\includes /I\Photoshop /I\PICA_SP /I\resources /I\sources /L\common /L\sources /L\includes release
      

      I get:
      NMAKE : fatal error U1065: invalid option ' \ '

      \Common would be what?
      In windows you would need a drive letter before that. Only in linux you can start folder name with a slash, but that would be a forward slash.
      Probably more something like .\Common as a relative folder makes sense. But you need to check the proper nmake syntax

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • I Offline
        I Offline
        i773
        wrote on last edited by
        #3

        "Is -L correct or shouldthis be a -I ( capital i )?"

        Is that not the CL option for library directory?

        "\Common would be what?"

        I'm building directly from the folder where the source includes and libraries are (I've changed CL directory to D:/myPlugin. So /Common is D:/myPlugin/Comon/xxxx

        1 Reply Last reply
        0
        • I Offline
          I Offline
          i773
          wrote on last edited by
          #4

          I got the CL options correct now:

          nmake /I Common /I common\includes /I PhotoshopAPI\Photoshop /I PhotoshopAPI\PICA_SP /I PhotoshopAPI\resources /I common\sources /L common /L common\sources /L common\includes release
          

          But now it's not including the files... All I am getting is a failed to include with:

          *'Common' is up-to-date
          'common\includes' is up-to-date
          'PhotoshopAPI\Photoshop' is up-to-date
          'PhotoshopAPI\PICA_SP' is up-to-date
          'PhotoshopAPI\resources' is up-to-date
          'common\sources' is up-to-date
          'Common' is up-to-date
          'common\sources' is up-to-date
          'common\includes' is up-to-date
          ```*
          JonBJ 1 Reply Last reply
          0
          • I i773

            I got the CL options correct now:

            nmake /I Common /I common\includes /I PhotoshopAPI\Photoshop /I PhotoshopAPI\PICA_SP /I PhotoshopAPI\resources /I common\sources /L common /L common\sources /L common\includes release
            

            But now it's not including the files... All I am getting is a failed to include with:

            *'Common' is up-to-date
            'common\includes' is up-to-date
            'PhotoshopAPI\Photoshop' is up-to-date
            'PhotoshopAPI\PICA_SP' is up-to-date
            'PhotoshopAPI\resources' is up-to-date
            'common\sources' is up-to-date
            'Common' is up-to-date
            'common\sources' is up-to-date
            'common\includes' is up-to-date
            ```*
            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @i773
            Somewhere along the line of whatever you are doing, you are totally mixing up options to NMAKE versus options to the CL compiler/linker.

            The /I and /L options you show are all being passed to NMAKE, and are irrelevant. You are meaning to supply them to the CL compiler........

            I 1 Reply Last reply
            0
            • JonBJ JonB

              @i773
              Somewhere along the line of whatever you are doing, you are totally mixing up options to NMAKE versus options to the CL compiler/linker.

              The /I and /L options you show are all being passed to NMAKE, and are irrelevant. You are meaning to supply them to the CL compiler........

              I Offline
              I Offline
              i773
              wrote on last edited by
              #6

              @JNBarchan nmake docs / fourms say to use those, if that's the wrong options for nmake do you know what options to use?

              Thanks!

              JonBJ 1 Reply Last reply
              0
              • I i773

                @JNBarchan nmake docs / fourms say to use those, if that's the wrong options for nmake do you know what options to use?

                Thanks!

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @i773 The https://stackoverflow.com/questions/3354390/how-do-i-specify-include-directories-using-nmake link you gave says no such thing! It says just what I have: "Pass -I"include dir" as command line option to cl". Note to cl, not to nmake!

                I'll post a bit more in few minutes.

                I 1 Reply Last reply
                0
                • JonBJ JonB

                  @i773 The https://stackoverflow.com/questions/3354390/how-do-i-specify-include-directories-using-nmake link you gave says no such thing! It says just what I have: "Pass -I"include dir" as command line option to cl". Note to cl, not to nmake!

                  I'll post a bit more in few minutes.

                  I Offline
                  I Offline
                  i773
                  wrote on last edited by
                  #8

                  @JNBarchan I was assuming it was "Command line" since the question was "How do I specify include directories using NMake?" and the answer was marked correct. My bad if that's not the correct way to do it.

                  JonBJ 2 Replies Last reply
                  0
                  • I i773

                    @JNBarchan I was assuming it was "Command line" since the question was "How do I specify include directories using NMake?" and the answer was marked correct. My bad if that's not the correct way to do it.

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #9

                    @i773
                    I cannot give you the answer as to actually what you need to do, as I'm afraid I don't build Qt sources.

                    You do need to understand the difference between NMAKE and CL. NMAKE is a program whose job is to look at your source files' attributes (not their contents) and decide what need compiling/linking. When it decides something needs doing, it will invoke CL (via a command-line) to compile/link your source/object files.

                    You want to pass /I & /L options to CL on its command-line which it will use to locate your includes/libraries. You do not want to pass /I or /L as command-line options to NMAKE itself.

                    The kind of command-line you will want will look something like:

                    NMAKE CFLAGS="/I dir1 /I dir2 /L dir3 /L dir4" release

                    This will tell NMAKE to pass those flags on its command-line call to CL. But I cannot tell you exactly what you will need 'coz I don't know what required for building Qt.

                    Having said that, I would be 99% sure there is a document you should be reading which will tell you how to build Qt from sources via NMAKE/CL, and you should be following those instructions....

                    1 Reply Last reply
                    1
                    • I i773

                      @JNBarchan I was assuming it was "Command line" since the question was "How do I specify include directories using NMake?" and the answer was marked correct. My bad if that's not the correct way to do it.

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #10

                      @i773
                      Can we start with two absolutely basic questions:

                      1. Are you indeed trying to build Qt itself from its sources (if so why)? You don't just mean you have some application of your own which calls Qt and you want to build that application?

                      2. Assuming you really are trying to build Qt from its sources, what document/instructions are you following to do that?

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        i773
                        wrote on last edited by
                        #11

                        I should have been more specific, yes I am trying to build Qt from source from within my current project, this question is directed in trying to build my plugin (Photoshop plugin) with it's included soureces and libraries (Sorry if this is not 100% a Qt question I thought it would have been a problem some have had in the past with nmake). When trying to build my make files it's failing because it cannot find the include directories that are set up in the VS project includes (My Plugin project). Sorry if this was not specified.

                        I've been following the Qt docs and an example of mine of a plugin I created for Autodesk Maya. Though they have their own custom qmake file for Qt 4.0 for building and all my includes and libraries were sourced directly in one folder, so I did not have to add include paths for the project.

                        JonBJ 1 Reply Last reply
                        0
                        • I i773

                          I should have been more specific, yes I am trying to build Qt from source from within my current project, this question is directed in trying to build my plugin (Photoshop plugin) with it's included soureces and libraries (Sorry if this is not 100% a Qt question I thought it would have been a problem some have had in the past with nmake). When trying to build my make files it's failing because it cannot find the include directories that are set up in the VS project includes (My Plugin project). Sorry if this was not specified.

                          I've been following the Qt docs and an example of mine of a plugin I created for Autodesk Maya. Though they have their own custom qmake file for Qt 4.0 for building and all my includes and libraries were sourced directly in one folder, so I did not have to add include paths for the project.

                          JonBJ Offline
                          JonBJ Offline
                          JonB
                          wrote on last edited by JonB
                          #12

                          @i773
                          I assume you really do need to use NMAKE, you can't use some environment (like VS) to do the building for you?

                          Anyway, as it stands you seem to have a NMAKE/CL question, not really a Qt one. Unless someone else posts here who is familiar with those, you are going to go need understand them yourself.

                          For now, you could actually try:

                          nmake CFLAGS="/I Common /I common\includes /I PhotoshopAPI\Photoshop /I PhotoshopAPI\PICA_SP /I PhotoshopAPI\resources /I common\sources /L common /L common\sources /L common\includes" release
                          

                          It should hopefully (assuming NMAKE passes $(CFLAGS) to the CL compiler, which I think it does) get you further than your attempts, and you might understand better where you're at....

                          I 1 Reply Last reply
                          0
                          • JonBJ JonB

                            @i773
                            I assume you really do need to use NMAKE, you can't use some environment (like VS) to do the building for you?

                            Anyway, as it stands you seem to have a NMAKE/CL question, not really a Qt one. Unless someone else posts here who is familiar with those, you are going to go need understand them yourself.

                            For now, you could actually try:

                            nmake CFLAGS="/I Common /I common\includes /I PhotoshopAPI\Photoshop /I PhotoshopAPI\PICA_SP /I PhotoshopAPI\resources /I common\sources /L common /L common\sources /L common\includes" release
                            

                            It should hopefully (assuming NMAKE passes $(CFLAGS) to the CL compiler, which I think it does) get you further than your attempts, and you might understand better where you're at....

                            I Offline
                            I Offline
                            i773
                            wrote on last edited by
                            #13

                            @JNBarchan I really appreciate everything, but unfortunately It's still not locating the includes with your example, I'll have to look deeper into this. Thank you!

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved