Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to incorporate non-inline assembly files and CPP into single QT project?
Forum Updated to NodeBB v4.3 + New Features

How to incorporate non-inline assembly files and CPP into single QT project?

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 2.0k Views 3 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.
  • BrooksB Offline
    BrooksB Offline
    Brooks
    wrote on last edited by
    #1

    Hi, guys
    I am newcomer to QT and Creator. Now I am facing a problem that I need incorporate several assemble files, with file extension, .s into my UI application, in order to speed up Color Space Conversion, but it seems that the method, which is exported in assembly file, could not be recognized by main CPP. The qtcreator compiler says, that is undefined referrence. Does QT Creator support such an hybrid project,mixing up with C++ and assemply together? Do I need special configuration on project?

    Brooks Li.

    K 1 Reply Last reply
    0
    • BrooksB Brooks

      Hi, guys
      I am newcomer to QT and Creator. Now I am facing a problem that I need incorporate several assemble files, with file extension, .s into my UI application, in order to speed up Color Space Conversion, but it seems that the method, which is exported in assembly file, could not be recognized by main CPP. The qtcreator compiler says, that is undefined referrence. Does QT Creator support such an hybrid project,mixing up with C++ and assemply together? Do I need special configuration on project?

      Brooks Li.

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

      @Brooks

      Hi and welcome to devnet

      Qt creator is only an IDE and has no compiling capabilities. You have to install an external compiler for compilation. If you installed compiler does not support assembler files.
      If your compiler does support assembler files you have to check how to add another compiler to the development environment.

      Not sure if this is very easy. Probably the best solution would be to use an external library hosting the compiled assembly files and providing a C++ header file.

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

      BrooksB 1 Reply Last reply
      0
      • M Offline
        M Offline
        mcosta
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        just to clarify: Qt Creator is only an IDE; it uses the compiler configured in the Kits.

        To import assembly files you should check which options are provided by the compiler are you using (MinGW, VisualStudio, GCC, clang, ....) and how to handle in your project file.

        Could you show your .pro file?

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        BrooksB 1 Reply Last reply
        0
        • K koahnig

          @Brooks

          Hi and welcome to devnet

          Qt creator is only an IDE and has no compiling capabilities. You have to install an external compiler for compilation. If you installed compiler does not support assembler files.
          If your compiler does support assembler files you have to check how to add another compiler to the development environment.

          Not sure if this is very easy. Probably the best solution would be to use an external library hosting the compiled assembly files and providing a C++ header file.

          BrooksB Offline
          BrooksB Offline
          Brooks
          wrote on last edited by
          #4

          @koahnig
          Thank you for your reply. I've got the solution to use inline assembly, supported by gcc to do color space conversion, instead of seperated assembly files. The performance is good enough.

          1 Reply Last reply
          0
          • M mcosta

            Hi and welcome to devnet,

            just to clarify: Qt Creator is only an IDE; it uses the compiler configured in the Kits.

            To import assembly files you should check which options are provided by the compiler are you using (MinGW, VisualStudio, GCC, clang, ....) and how to handle in your project file.

            Could you show your .pro file?

            BrooksB Offline
            BrooksB Offline
            Brooks
            wrote on last edited by
            #5

            @mcosta
            You are right, QT just uses the configured compiler in kits. So, in mkspec, I added the new options,

            QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
            QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

            QMAKE_CFLAGS_DEBUG = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
            QMAKE_CXXFLAGS_DEBUG = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

            in /usr/local/Trolltech/QtEmbedded-4.8.5-arm/mkspecs/qws/linux-arm-g++/qmake.conf.

            And that works for solving my problem.

            Thanks.

            1 Reply Last reply
            1

            • Login

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