Fix windows build;

LOVR_EXPORT needs to be on the declaration, unfortunately.
This commit is contained in:
bjorn 2019-08-26 15:53:10 -07:00
parent 5fb3d55f37
commit 305596adf8
12 changed files with 23 additions and 26 deletions

View File

@ -2,21 +2,22 @@
#include <lauxlib.h>
#include <lualib.h>
#include <stdint.h>
#include "util.h"
#pragma once
// Modules
int luaopen_lovr(lua_State* L);
int luaopen_lovr_audio(lua_State* L);
int luaopen_lovr_data(lua_State* L);
int luaopen_lovr_event(lua_State* L);
int luaopen_lovr_filesystem(lua_State* L);
int luaopen_lovr_graphics(lua_State* L);
int luaopen_lovr_headset(lua_State* L);
int luaopen_lovr_math(lua_State* L);
int luaopen_lovr_physics(lua_State* L);
int luaopen_lovr_thread(lua_State* L);
int luaopen_lovr_timer(lua_State* L);
LOVR_EXPORT int luaopen_lovr(lua_State* L);
LOVR_EXPORT int luaopen_lovr_audio(lua_State* L);
LOVR_EXPORT int luaopen_lovr_data(lua_State* L);
LOVR_EXPORT int luaopen_lovr_event(lua_State* L);
LOVR_EXPORT int luaopen_lovr_filesystem(lua_State* L);
LOVR_EXPORT int luaopen_lovr_graphics(lua_State* L);
LOVR_EXPORT int luaopen_lovr_headset(lua_State* L);
LOVR_EXPORT int luaopen_lovr_math(lua_State* L);
LOVR_EXPORT int luaopen_lovr_physics(lua_State* L);
LOVR_EXPORT int luaopen_lovr_thread(lua_State* L);
LOVR_EXPORT int luaopen_lovr_timer(lua_State* L);
extern const luaL_Reg lovrModules[];
// Objects

View File

@ -249,7 +249,7 @@ static const luaL_Reg lovrAudio[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_audio(lua_State* L) {
int luaopen_lovr_audio(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrAudio);
luax_registertype(L, Microphone);

View File

@ -132,7 +132,7 @@ static const luaL_Reg lovrData[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_data(lua_State* L) {
int luaopen_lovr_data(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrData);
luax_registertype(L, Blob);

View File

@ -196,7 +196,7 @@ static const luaL_Reg lovrEvent[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_event(lua_State* L) {
int luaopen_lovr_event(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrEvent);

View File

@ -1,5 +1,4 @@
#include "api.h"
#include "util.h"
#include "filesystem/filesystem.h"
#include "filesystem/file.h"
#include "data/blob.h"
@ -446,7 +445,7 @@ static int libLoader(lua_State* L) {
return 0;
}
LOVR_EXPORT int luaopen_lovr_filesystem(lua_State* L) {
int luaopen_lovr_filesystem(lua_State* L) {
lua_getglobal(L, "arg");
if (lua_istable(L, -1)) {
lua_getfield(L, -1, "exe");

View File

@ -13,7 +13,6 @@
#include "filesystem/filesystem.h"
#include "core/arr.h"
#include "core/ref.h"
#include "util.h"
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
@ -1693,7 +1692,7 @@ static const luaL_Reg lovrGraphics[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_graphics(lua_State* L) {
int luaopen_lovr_graphics(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrGraphics);
luax_registertype(L, Canvas);

View File

@ -592,7 +592,7 @@ static const luaL_Reg lovrHeadset[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_headset(lua_State* L) {
int luaopen_lovr_headset(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrHeadset);

View File

@ -343,7 +343,7 @@ static int l_lovrLightUserdataOp(lua_State* L) {
return 1;
}
LOVR_EXPORT int luaopen_lovr_math(lua_State* L) {
int luaopen_lovr_math(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrMath);
luax_registertype(L, Curve);

View File

@ -1,5 +1,4 @@
#include "api.h"
#include "util.h"
#include "physics/physics.h"
#include "core/ref.h"
@ -149,7 +148,7 @@ static const luaL_Reg lovrPhysics[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_physics(lua_State* L) {
int luaopen_lovr_physics(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrPhysics);
luax_registertype(L, World);

View File

@ -1,5 +1,4 @@
#include "api.h"
#include "util.h"
#include "event/event.h"
#include "filesystem/filesystem.h"
#include "thread/thread.h"
@ -90,7 +89,7 @@ static const luaL_Reg lovrThreadModule[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_thread(lua_State* L) {
int luaopen_lovr_thread(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrThreadModule);
luax_registertype(L, Thread);

View File

@ -1,5 +1,4 @@
#include "api.h"
#include "util.h"
#include "timer/timer.h"
static int l_lovrTimerGetDelta(lua_State* L) {
@ -43,7 +42,7 @@ static const luaL_Reg lovrTimer[] = {
{ NULL, NULL }
};
LOVR_EXPORT int luaopen_lovr_timer(lua_State* L) {
int luaopen_lovr_timer(lua_State* L) {
lua_newtable(L);
luaL_register(L, NULL, lovrTimer);
if (lovrTimerInit()) {

View File

@ -1,5 +1,6 @@
#include "platform.h"
#include <Windows.h>
#include <stdio.h>
#include "platform_glfw.c.h"