-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathcompiler.h
More file actions
28 lines (22 loc) · 708 Bytes
/
compiler.h
File metadata and controls
28 lines (22 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include <QByteArray>
#include <QString>
class Compiler {
public:
Compiler();
~Compiler();
int compileAndExecute(const QString &cc, const QStringList &options, const QString &src);
int compileAndExecute(const QString &src);
int compileFileAndExecute(const QString &path);
void printLastCompilationError() const;
void printContextCompilationError() const;
static bool isSetDebugOption();
static bool isSetQtOption();
static QString cxx();
static QString cxxflags();
static QString ldflags();
private:
bool compile(const QString &cc, const QStringList &options, const QString &code);
QString _sourceCode;
QString _compileError;
};