Use static linking instead of dynamic linking

This commit is contained in:
Karroffel
2017-07-23 17:53:50 +02:00
parent 606d2624af
commit 4769f49cb4
23 changed files with 64 additions and 303 deletions

View File

@@ -1,16 +1,6 @@
#ifndef ARRAY_H
#define ARRAY_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include <godot/godot_array.h>
#include "String.hpp"
@@ -28,7 +18,7 @@ class PoolColorArray;
class Object;
class GD_CPP_CORE_API Array {
class Array {
godot_array _godot_array;
public:
Array();

View File

@@ -1,16 +1,6 @@
#ifndef BASIS_H
#define BASIS_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Defs.hpp"
#include "Vector3.hpp"
@@ -19,10 +9,12 @@ namespace godot {
class Quat;
class GD_CPP_CORE_API Basis {
class Basis {
public:
Vector3 elements[3];
union {
Vector3 elements[3];
Vector3 x, y, z;
};
Basis(const Quat& p_quat); // euler
Basis(const Vector3& p_euler); // euler

View File

@@ -1,16 +1,6 @@
#ifndef COLOR_H
#define COLOR_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include <godot/godot_color.h>
#include <cmath>
@@ -20,7 +10,7 @@
namespace godot {
struct GD_CPP_CORE_API Color {
struct Color {
private:

View File

@@ -1,16 +1,6 @@
#ifndef DICTIONARY_H
#define DICTIONARY_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Variant.hpp"
#include "Array.hpp"
@@ -19,7 +9,7 @@
namespace godot {
class GD_CPP_CORE_API Dictionary {
class Dictionary {
godot_dictionary _godot_dictionary;
public:
Dictionary();

View File

@@ -1,22 +1,12 @@
#ifndef GODOT_GLOBAL_HPP
#define GODOT_GLOBAL_HPP
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "String.hpp"
namespace godot {
class GD_CPP_CORE_API Godot {
class Godot {
public:
static void print(const String& message);

View File

@@ -1,16 +1,6 @@
#ifndef NODEPATH_H
#define NODEPATH_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "String.hpp"
#include <godot/godot_node_path.h>
@@ -18,7 +8,7 @@
namespace godot {
class GD_CPP_CORE_API NodePath
class NodePath
{
godot_node_path _node_path;
public:

View File

@@ -1,16 +1,6 @@
#ifndef PLANE_H
#define PLANE_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Vector3.hpp"
#include <cmath>
@@ -25,7 +15,7 @@ enum ClockDirection {
COUNTERCLOCKWISE
};
class GD_CPP_CORE_API Plane {
class Plane {
public:
Vector3 normal;
real_t d;

View File

@@ -1,16 +1,6 @@
#ifndef POOLARRAYS_H
#define POOLARRAYS_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Defs.hpp"
#include "String.hpp"
@@ -24,7 +14,7 @@ namespace godot {
class Array;
class GD_CPP_CORE_API PoolByteArray {
class PoolByteArray {
godot_pool_byte_array _godot_array;
public:
PoolByteArray();
@@ -55,7 +45,7 @@ public:
};
class GD_CPP_CORE_API PoolIntArray {
class PoolIntArray {
godot_pool_int_array _godot_array;
public:
PoolIntArray();
@@ -86,7 +76,7 @@ public:
};
class GD_CPP_CORE_API PoolRealArray {
class PoolRealArray {
godot_pool_real_array _godot_array;
public:
PoolRealArray();
@@ -117,7 +107,7 @@ public:
};
class GD_CPP_CORE_API PoolStringArray {
class PoolStringArray {
godot_pool_string_array _godot_array;
public:
PoolStringArray();
@@ -149,7 +139,7 @@ public:
class GD_CPP_CORE_API PoolVector2Array {
class PoolVector2Array {
godot_pool_vector2_array _godot_array;
public:
PoolVector2Array();
@@ -180,7 +170,7 @@ public:
};
class GD_CPP_CORE_API PoolVector3Array {
class PoolVector3Array {
godot_pool_vector3_array _godot_array;
public:
PoolVector3Array();
@@ -211,7 +201,7 @@ public:
};
class GD_CPP_CORE_API PoolColorArray {
class PoolColorArray {
godot_pool_color_array _godot_array;
public:
PoolColorArray();

View File

@@ -1,16 +1,6 @@
#ifndef QUAT_H
#define QUAT_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include <cmath>
#include "Vector3.hpp"
@@ -19,7 +9,7 @@
namespace godot {
class GD_CPP_CORE_API Quat{
class Quat{
public:
real_t x,y,z,w;

View File

@@ -1,23 +1,13 @@
#ifndef RID_H
#define RID_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include <godot/godot_rid.h>
namespace godot {
class Object;
class GD_CPP_CORE_API RID {
class RID {
godot_rid _godot_rid;
public:

View File

@@ -1,16 +1,6 @@
#ifndef RECT2_H
#define RECT2_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Vector2.hpp"
#include <cmath>
@@ -26,7 +16,7 @@ typedef Vector2 Point2;
class Transform2D;
struct GD_CPP_CORE_API Rect2 {
struct Rect2 {
Point2 pos;
Size2 size;

View File

@@ -1,16 +1,6 @@
#ifndef RECT3_H
#define RECT3_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Vector3.hpp"
#include "Plane.hpp"
@@ -19,7 +9,7 @@
namespace godot {
class GD_CPP_CORE_API Rect3 {
class Rect3 {
public:
Vector3 pos;
Vector3 size;

View File

@@ -1,16 +1,6 @@
#ifndef REF_H
#define REF_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Variant.hpp"
namespace godot {

View File

@@ -1,23 +1,13 @@
#ifndef STRING_H
#define STRING_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include <godot/godot_string.h>
namespace godot {
class NodePath;
class GD_CPP_CORE_API String
class String
{
godot_string _godot_string;
public:

View File

@@ -1,16 +1,6 @@
#ifndef TRANSFORM_H
#define TRANSFORM_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Basis.hpp"
#include "Plane.hpp"
@@ -18,7 +8,7 @@
namespace godot {
class GD_CPP_CORE_API Transform {
class Transform {
public:
Basis basis;

View File

@@ -1,16 +1,6 @@
#ifndef TRANSFORM2D_H
#define TRANSFORM2D_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Vector2.hpp"
@@ -20,7 +10,7 @@ typedef Vector2 Size2;
class Rect2;
struct GD_CPP_CORE_API Transform2D {
struct Transform2D {
// Warning #1: basis of Transform2D is stored differently from Basis. In terms of elements array, the basis matrix looks like "on paper":
// M = (elements[0][0] elements[1][0])
// (elements[0][1] elements[1][1])

View File

@@ -1,16 +1,6 @@
#ifndef VARIANT_H
#define VARIANT_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include <godot/godot_variant.h>
#include "Defs.hpp"
@@ -38,7 +28,7 @@ class Dictionary;
class Array;
class GD_CPP_CORE_API Variant {
class Variant {
godot_variant _godot_variant;
public:
enum Type {

View File

@@ -1,17 +1,6 @@
#ifndef VECTOR2_H
#define VECTOR2_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include <godot/godot_vector2.h>
#include "Defs.hpp"
@@ -20,7 +9,7 @@ namespace godot {
class String;
struct GD_CPP_CORE_API Vector2 {
struct Vector2 {
union {
real_t x;

View File

@@ -1,16 +1,6 @@
#ifndef VECTOR3_H
#define VECTOR3_H
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
#include "Defs.hpp"
#include "String.hpp"
@@ -18,7 +8,7 @@
namespace godot {
struct GD_CPP_CORE_API Vector3 {
struct Vector3 {
enum Axis {
AXIS_X,
@@ -40,8 +30,6 @@ struct GD_CPP_CORE_API Vector3 {
Vector3();
Vector3(const Vector3& b);
const real_t& operator[](int p_axis) const;
real_t& operator[](int p_axis);