yum-mirror/slang

Making it easier to work with shaders

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

Ellie Hermaszewskaformatf65d756bf

master
567 B26 linesraw
1// TEST(smoke):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 int symbolNotFound;
21
22EXTERN_C DLL_EXPORT int test(int intValue, const char* textValue, char* outTextValue)
23{
24    strcpy(outTextValue, textValue);
25    return intValue + symbolNotFound;
26}