PDA

View Full Version : How to add Assebly files to Qt project?



Zingam
18th December 2013, 13:10
I would like to use x86 and ARM assembly in my Qt projects.
What would be the recommened way to add external files in assembly to Qt Creator?

I tried to add a file to the project:


QT += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = ImageManipulator
TEMPLATE = app

QMAKE_CXXFLAGS +=-masm=intel

SOURCES += main.cpp\
mainwindow.cpp\
functions.s

HEADERS += mainwindow.h

FORMS += mainwindow.ui


function.s gets compiled to .o but the linker cannot find the functions.

Also if I use QMAKE_CXXFLAGS += -masm=intel
This causes:
{standard input}: Assembler messages:
{standard input}:1697: Error: no such instruction: `subl $1,DWORD PTR [eax]'
Even if there is no assebly at all.