Created
June 5, 2021 20:10
-
-
Save vladiant/ecc4bdd277424054f6543c3a74eabd72 to your computer and use it in GitHub Desktop.
Export methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifdef _EXPORT | |
#ifdef _MSC_VER | |
#define DLL_API __declspec(dllexport) | |
#elif defined __GNUC__ | |
#define DLL_API __attribute__((visibility("default"))) | |
#endif | |
#else | |
#ifdef _MSC_VER | |
#define DLL_API __declspec(dllimport) | |
#elif defined __GNUC__ | |
#define DLL_API __attribute__((visibility("hidden"))) | |
#endif | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "exporting.h" | |
extern "C" { | |
DLL_API void say_hello_dll(); | |
} | |
// See https://github.com/onqtam/doctest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment