- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to compile a project on Linux with oneAPI using Eclipse.
The include to svrng.h fails because:
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
What might be the problem?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the pictures and log you've supplied, you're using Intel oneAPI DPC++ compiler. Since you mentioned that it's a pure C++ application, you should use icx compiler instead and this problem should go away.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please supply reproducer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
just include "svrng.h"
I included it (just #include "svrng.h" line) to a working project - and it fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please tell me which compiler you tried to use? Is it a DPC++ or C++ application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a pure C++ application that compiles fine with the OneAPI compiler up to the point where I include "svrng.h"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please provide a screen shot of project settings/compiler settings in Eclipse, and a copy of your verbose build log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These are the settings I change:
The log:
Building file: ../JustTimeDelay.cpp
Invoking: Intel(R) oneAPI DPC++ Compiler
dpcpp -Wall -O2 -ipp=common -I/home/user/eclipse-workspace/TimeDelay -fPIC -mavx2 -MMD -MP -c -o "JustTimeDelay.o" "../JustTimeDelay.cpp"
In file included from ../JustTimeDelay.cpp:7:
In file included from /home/user/eclipse-workspace/TimeDelay/TimeDelay.h:5:
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: error: incomplete result type 'struct __declspec' in function definition
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:45: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:28: note: forward declaration of '__declspec'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:34: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:350:65: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_uint16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_uint32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_uint32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:351:89: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_uint32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_ulong8_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_ulong8_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:363:65: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; } svrng_ulong8_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_ulong16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:37: error: function definition declared 'typedef'
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_ulong16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:364:89: error: C++ requires a type specifier for all declarations
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; } svrng_ulong16_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:365:28: error: expected parameter declarator
typedef struct _ALIGN_ { __m256i r1; __m256i r2; __m256i r3; __m256i r4; __m256i r5; __m256i r6; __m256i r7; __m256i r8; } svrng_ulong32_t;
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:365:28: error: expected ')'
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:51: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:365:28: note: to match this '('
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/../compiler/include/svrng.h:338:50: note: expanded from macro '_ALIGN_'
#define _ALIGN_ __declspec(align(32))
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [subdir.mk:23: JustTimeDelay.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the pictures and log you've supplied, you're using Intel oneAPI DPC++ compiler. Since you mentioned that it's a pure C++ application, you should use icx compiler instead and this problem should go away.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the option of Intel Compiler Classic.
Is it the one you refer to?
If not, which one is it?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An Intel Classic compiler should be able to compile your application. You can also use new Intel oneAPI C++ compiler. Please refer to this article:
Adding the Compiler to Eclipse*
This step is needed only if you are manually installing the Intel® oneAPI DPC++/C++ Compiler plug-in for Eclipse*.
To add the Intel oneAPI DPC++/C++ Compiler product extension to your Eclipse configuration:
- Start Eclipse.
- Select Help > Install New Software.
- Next to the Work with field, click the Add button. The Add Repository dialog box opens.
- Click the Archive button and browse to the <install_dir>/compiler/<version>/linux/ide_support directory. Select the .zip file that starts with com.intel.compiler for C++ or com.intel.dpcpp.compiler for DPC++, then click OK.
- Select Intel® Software Development ToolsIntel® C++ Compiler for C++ or Intel® oneAPI DPC++ CompilerIntel® oneAPI DPC++ Compiler for DPC++, then click OK.
- Follow the installation instructions.
- When asked if you want to restart Eclipse, select Yes.
When Eclipse restarts, you can create and work with CDT projects that use the Intel oneAPI DPC++/C++ Compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am going to close this case for now as a solution has been provided.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page