简体   繁体   中英

How to use 32-bit Assembly functions in 64-bit Qt app?

I have written some arithmetic operations in Assembly *.s file in 32-bit architecture and I'd like to use them in Qt application built by Qt 5.10.1 GCC 64bit kit. Creating a simple C++ program I used following command to build executable file:

g++ -o prog main.cpp float_operations.s -m32

Now I can't figure out how to emplace building *.s file into building process of Qt app to make functions from *.s file usable in my Qt app.

I've found some solutions to include x64 assembly files but in this case is strongly necessary for me to use 32-bit assembly :(

Thank you.

You have 3 options:

  • Rewrite the assembly to 64-bit (any language with a 64-bit assembler or compiler) so it can load into a 64-bit process.
  • Change the application to 32-bit so the 32-bit assembly can run in-process.
  • Run two processes, one 32-bit and one 64-bit, and use interprocess communication.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM