Skip to content

Commit

Permalink
Add mingw shared lib support (#247)
Browse files Browse the repository at this point in the history
* Add support for linking cute_framework as a shared lib via MinGW gcc/ld

* Remove some unnecessary whitespace
  • Loading branch information
waldnercharles authored Nov 18, 2024
1 parent 6e94404 commit e590b01
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/cute.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Kariem
* Bullno1
* apos
* Smalltalk
* Charles Waldner
* apirux
* Maximilliankk
* chunqian
Expand Down
16 changes: 13 additions & 3 deletions include/cute_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
# define CF_ANDROID 1
#elif defined(__EMSCRIPTEN__)
# define CF_EMSCRIPTEN 1
#elif defined(__CYGWIN__)
# define CF_CYGWIN 1
#endif

// Vista and later only. This helps MingW builds.
Expand All @@ -65,11 +67,19 @@
#endif

#ifndef CF_STATIC
# ifdef _MSC_VER
# if defined CF_WINDOWS || defined CF_CYGWIN
# ifdef CF_EXPORT
# define CF_API __declspec(dllexport)
# ifdef __GNUC__
# define CF_API __attribute__((dllexport))
# else
# define CF_API __declspec(dllexport)
# endif
# else
# define CF_API __declspec(dllimport)
# ifdef __GNUC__
# define CF_API __attribute__((dllimport))
# else
# define CF_API __declspec(dllimport)
# endif
# endif
# else
# if ((__GNUC__ >= 4) || defined(__clang__))
Expand Down

0 comments on commit e590b01

Please sign in to comment.