修复linux导出头

This commit is contained in:
xx
2024-05-28 18:31:55 +08:00
parent 0fc030a3cf
commit d1ea6131d0
2 changed files with 7 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
#include "core/define.h"
#include "core/config.h"
extern "C" {
__declspec(dllexport) int fastweb(const char* config_filepath)
int fastweb(const char* config_filepath)
{
std::cout << "=========== [fastweb engine] ============" << std::endl;
if (sConfig->open(config_filepath) == false)

View File

@@ -1,5 +1,9 @@
#if defined(_WIN32) || defined(_WIN64)
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __attribute__((visibility("default")))
#endif
extern "C" {
__declspec(dllexport) int fastweb(const char* config_filepath);
DLL_EXPORT int fastweb(const char* config_filepath);
}