diff options
| author | ruki <[email protected]> | 2025-11-09 19:51:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-09 19:51:04 +0800 |
| commit | 91f6ed08fe32e36d555129efa4afdd82113f0eb4 (patch) | |
| tree | 2bfee23488c8479c83833677262ee83b9e362cbb /xmake/templates/c++/shared/project | |
| parent | c89c94bf89e98c8e42e786aacc0b334a57474179 (diff) | |
format tests and templates
Diffstat (limited to 'xmake/templates/c++/shared/project')
| -rw-r--r-- | xmake/templates/c++/shared/project/src/foo.h | 6 | ||||
| -rw-r--r-- | xmake/templates/c++/shared/project/src/main.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/templates/c++/shared/project/src/foo.h b/xmake/templates/c++/shared/project/src/foo.h index 20df0baa4..bd496c784 100644 --- a/xmake/templates/c++/shared/project/src/foo.h +++ b/xmake/templates/c++/shared/project/src/foo.h @@ -3,11 +3,11 @@ extern "C" { #endif #if defined(_WIN32) -# define __export __declspec(dllexport) +#define __export __declspec(dllexport) #elif defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) -# define __export __attribute__((visibility("default"))) +#define __export __attribute__((visibility("default"))) #else -# define __export +#define __export #endif __export int add(int a, int b); diff --git a/xmake/templates/c++/shared/project/src/main.cpp b/xmake/templates/c++/shared/project/src/main.cpp index d55d4d342..3834ee4d3 100644 --- a/xmake/templates/c++/shared/project/src/main.cpp +++ b/xmake/templates/c++/shared/project/src/main.cpp @@ -1,7 +1,7 @@ #include "foo.h" #include <iostream> -int main(int argc, char** argv) { +int main(int argc, char **argv) { std::cout << "add(1, 2) = " << add(1, 2) << std::endl; return 0; } |
