Skip to content

Commit

Permalink
W32: prevent "dllexport" from being added to globalvardefs if buildin…
Browse files Browse the repository at this point in the history
…g for static linking

Closes: #83
  • Loading branch information
umlaeute committed Nov 8, 2022
1 parent 6c9f20d commit b40fcf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/flite.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ extern "C" {
#include "cst_units.h"
#include "cst_tokenstream.h"

#ifdef FLITE_STATIC
#define GLOBALVARDEF
#else
#ifdef WIN32
/* For Visual Studio 2012 global variable definitions */
#define GLOBALVARDEF __declspec(dllexport)
#else
#define GLOBALVARDEF
#endif
#endif
extern GLOBALVARDEF cst_val *flite_voice_list;
extern GLOBALVARDEF cst_lang flite_lang_list[20];
Expand Down
4 changes: 4 additions & 0 deletions src/synth/flite.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@
#include "cst_clunits.h"
#include "cst_cg.h"

#ifdef FLITE_STATIC
#define GLOBALVARDEF
#else
#ifdef WIN32
/* For Visual Studio 2012 global variable definitions */
#define GLOBALVARDEF __declspec(dllexport)
#else
#define GLOBALVARDEF
#endif
#endif

/* This is a global, which isn't ideal, this may change */
/* It is set when flite_set_voice_list() is called which happens in */
Expand Down

0 comments on commit b40fcf2

Please sign in to comment.