Skip to content

Commit

Permalink
Add extern "C" { ... } to import framework headers
Browse files Browse the repository at this point in the history
fixes #130
  • Loading branch information
t-sommer committed Aug 23, 2021
1 parent f33f660 commit 47d2503
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/FMI.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* in the project root for license information. *
**************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _WIN32
#include <Windows.h>
#endif
Expand Down Expand Up @@ -382,4 +386,8 @@ FMI_STATIC const char* FMIValueReferencesToString(FMIInstance *instance, const F

FMI_STATIC const char* FMIValuesToString(FMIInstance *instance, size_t nvr, const void *value, FMIVariableType variableType);

#ifdef __cplusplus
} /* end of extern "C" { */
#endif

#endif // FMI_H
8 changes: 8 additions & 0 deletions include/FMI1.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* in the project root for license information. *
**************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "FMI.h"


Expand Down Expand Up @@ -62,4 +66,8 @@ FMI_STATIC fmi1Status FMI1GetIntegerStatus (FMIInstance *instance, co
FMI_STATIC fmi1Status FMI1GetBooleanStatus (FMIInstance *instance, const fmi1StatusKind s, fmi1Boolean* value);
FMI_STATIC fmi1Status FMI1GetStringStatus (FMIInstance *instance, const fmi1StatusKind s, fmi1String* value);

#ifdef __cplusplus
} /* end of extern "C" { */
#endif

#endif // FMI1_H
8 changes: 8 additions & 0 deletions include/FMI2.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* in the project root for license information. *
**************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "FMI.h"


Expand Down Expand Up @@ -151,4 +155,8 @@ FMI_STATIC fmi2Status FMI2GetBooleanStatus(FMIInstance *instance, const fmi2Stat

FMI_STATIC fmi2Status FMI2GetStringStatus(FMIInstance *instance, const fmi2StatusKind s, fmi2String* value);

#ifdef __cplusplus
} /* end of extern "C" { */
#endif

#endif // FMI2_H
8 changes: 8 additions & 0 deletions include/FMI3.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* in the project root for license information. *
**************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "FMI.h"


Expand Down Expand Up @@ -415,4 +419,8 @@ FMI_STATIC fmi3Status FMI3ActivateModelPartition(FMIInstance *instance,
size_t clockElementIndex,
fmi3Float64 activationTime);

#ifdef __cplusplus
} /* end of extern "C" { */
#endif

#endif // FMI3_H

0 comments on commit 47d2503

Please sign in to comment.