How to install # __forceinline inline?

I have a Microsoft code (XLCALL.CPP) that I am trying to compile with CodeBlocks / MinGW.
On this line, I get a compile-time error:

__forceinline void FetchExcel12EntryPt(void)

This is the error message I get:

XLCALL.CPP | 36 | error: expected constructor, destructor or type conversion to 'void'

This error is expected because __forceinline is a specific language addition not recognized by GCC.

So, in order to compile things, I am trying to add thiese definitions to CodeBlocks (project build parameters / compiler settings / # defines):

#define __forceinline inline
#define __forceinline 

However, I still get the same error.

If I don’t specify the #define preprocessor (i.e. __forceinline inline) command in the dialog box , this is what I get:

XLCALL.CPP | 36 | :

Visual ++?

+5
1

__forceinline=inline, , -D GCC.

, inline GCC, , . GCC- __forceinline - always_inline - . :

#define __forceinline __attribute__((always_inline))

:

__forceinline="__attribute__((always_inline))"

( : - , MSVC, !)

+9

All Articles