Try:
OBJECTS += f1.o f2.o f3.o f3.o
OBJECTS += f1.o f2.o f3.o f3.o
To copy to clipboard, switch view to plain text mode
although I think that, if you have the source, building it into your app directly or via a library is a better option.
You should not need to rename the files to include them into your project. For example this project:
// Pro file
TEMPLATE = app
SOURCES += main.cpp hello.c
// hello.h
extern "C" {
int hello();
}
// hello.c
int hello() {
return 42;
}
// main.cpp
#include <QtCore>
#include <QDebug>
#include "hello.h"
int main(int argc, char *argv[])
{
qDebug() << hello() << flush;
return 0;
}
// Pro file
TEMPLATE = app
SOURCES += main.cpp hello.c
// hello.h
extern "C" {
int hello();
}
// hello.c
int hello() {
return 42;
}
// main.cpp
#include <QtCore>
#include <QDebug>
#include "hello.h"
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
qDebug() << hello() << flush;
return 0;
}
To copy to clipboard, switch view to plain text mode
works fine, with qmake using gcc for the C file and g++ for the cpp file.
Bookmarks