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. Cannot link directX to Qt

Cannot link directX to Qt

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.4k Views
  • 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.
  • P Offline
    P Offline
    Project try
    wrote on last edited by
    #1

    Hey , I've tried to add the path and libs to my pro file and it doesn't work

    @

    INCLUDEPATH += $$PWD/../../../../Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include
    DEPENDPATH += $$PWD/../../../../Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include\

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x64/ -ld3d9
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x64/ -ld3d9d

    @

    Basically when I write #include<anything> for example a header called d3dx9tex.h it doesn't recognize it , and this:

    @
    #include<Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include/d3d9.h>
    #include<Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include/d3dx9tex.h>
    #include<Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include/d3dx9.h>
    @

    gives me errors which is " no such file or directory "

    not sure if there's a prefix which I should use before the name of the header ? if so which is it ?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      There are the backslashes at the end of INCLUDEPATH and DEPENDPATH.
      Try to remove those backslashes.

      Also, if it is possible, try to avoid spaces in the paths.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Project try
        wrote on last edited by
        #3

        Thanks for replying , I'm sorry about the backslashes I added them myself since Qt won't add if you tried to add a library.

        Still doesn't work :(

        Well since I installed it in this path , I don't think moving it to another path is a good idea :(

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Do you mean that you still can't use the includes ? Did you try with an absolute path ? e.g.

          @INCLUDEPATH += C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include@

          Like andreyc said, the backslashes where you put them means that the following line should be happened to the current one, which you don't want in your case.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            Project try
            wrote on last edited by
            #5

            Thank you , I actually solved it after moving it and modifying to this:

            @
            INCLUDEPATH +=C:/DirectXSDK/Include
            LIBS += C:/DirectXSDK/Lib/x86/d3d9.lib
            LIBS += C:/DirectXSDK/Lib/x86/d3dx9d.lib
            LIBS += C:/DirectXSDK/Lib/x86/d3dx9.lib
            @

            there are some problems " crashing " but I don't think it's Qt related . so thanks all of u

            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