Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compiling MASM using QT
Qt 6.11 is out! See what's new in the release blog

Compiling MASM using QT

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 1.1k 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.
  • C Offline
    C Offline
    ChrisPanda
    wrote on last edited by ChrisPanda
    #1

    Hello how can i enable masm for msvc? i need to compile .asm file

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      MASM has no so much to do with Qt.

      However, it should already be included in your VS installation.

      https://docs.microsoft.com/en-us/cpp/assembler/masm/masm-for-x64-ml64-exe?view=msvc-160

      1 Reply Last reply
      0
      • C Offline
        C Offline
        ChrisPanda
        wrote on last edited by
        #3

        Thanks for the reply sir but my problem is i dont know how do i compile inside the qt. but i know how to compile from VS

        mrjjM 1 Reply Last reply
        0
        • C ChrisPanda

          Thanks for the reply sir but my problem is i dont know how do i compile inside the qt. but i know how to compile from VS

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi

          Ah you mean to use it inside QCreator ? ( the IDE/editor)

          You need to tell it about this new file type and setup to call masm.exe

          like here
          https://forum.qt.io/topic/74547/can-i-bind-asm-files-containing-x64-assembly-code-to-my-c-project/9

          C 1 Reply Last reply
          1
          • mrjjM mrjj

            Hi

            Ah you mean to use it inside QCreator ? ( the IDE/editor)

            You need to tell it about this new file type and setup to call masm.exe

            like here
            https://forum.qt.io/topic/74547/can-i-bind-asm-files-containing-x64-assembly-code-to-my-c-project/9

            C Offline
            C Offline
            ChrisPanda
            wrote on last edited by
            #5

            @mrjj Thanks sir i tried to search before i see your post and we found the same :D
            https://forum.qt.io/topic/74547/can-i-bind-asm-files-containing-x64-assembly-code-to-my-c-project/3

            Its now working but do you know how i properly point my output file to its release directory? cause i found its generated obj file outside the release directory :D

            ASM_FILES += \
                  spoofer.asm
            
            ml64.name = ML64 ${QMAKE_FILE_IN}
            ml64.input = ASM_FILES
            ml64.variable_out = OBJECTS
            ml64.commands = ML64 /c ${QMAKE_FILE_NAME} /Fo ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
            ml64.output = ${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
            ml64.CONFIG += target_predeps
            
            mrjjM 1 Reply Last reply
            1
            • C ChrisPanda

              @mrjj Thanks sir i tried to search before i see your post and we found the same :D
              https://forum.qt.io/topic/74547/can-i-bind-asm-files-containing-x64-assembly-code-to-my-c-project/3

              Its now working but do you know how i properly point my output file to its release directory? cause i found its generated obj file outside the release directory :D

              ASM_FILES += \
                    spoofer.asm
              
              ml64.name = ML64 ${QMAKE_FILE_IN}
              ml64.input = ASM_FILES
              ml64.variable_out = OBJECTS
              ml64.commands = ML64 /c ${QMAKE_FILE_NAME} /Fo ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
              ml64.output = ${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
              ml64.CONFIG += target_predeps
              
              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              Hi
              i think its the
              ml64.output
              you can try do

              message($$ml64.output)
              and see if that looks like the place.
              then you might just need to append the release folder to it

              Update: nope i was wrong. it's only the filename.
              Not sure it will like to have a path there.

              even if its not in the Release folder, it still links it ?

              it seems you want it like this
              https://stackoverflow.com/questions/30265674/qmake-extra-compilers-output-directory-msvc

              something like
              ml64.output = ${QMAKE_VAR_OBJECTS_DIR}release/${QMAKE_FILE_IN_BASE}$${QMAKE_EXT_OBJ}

              se link how to handle debug and release

              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