yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

jarcherNVTry both LoadLibrary functions on Windows (#8368)5500f1176

master
537 B24 linesraw
1// TEST(smoke,shared-library):CPP_COMPILER_SHARED_LIBRARY:
2
3#include <stdio.h>
4#include <stdlib.h>
5#include <string.h>
6
7#if defined(_MSC_VER)
8#define DLL_EXPORT __declspec(dllexport)
9#else
10// #   define DLL_EXPORT
11#define DLL_EXPORT __attribute__((dllexport)) __attribute__((__visibility__("default")))
12#endif
13
14#ifdef __cplusplus
15#define EXTERN_C extern "C"
16#else
17#define EXTERN_C
18#endif
19
20EXTERN_C DLL_EXPORT int test(int intValue, const char* textValue, char* outTextValue)
21{
22    strcpy(outTextValue, textValue);
23    return intValue;
24}