Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

identifier "class" is undefined

wjpmuxa
Beginner
1,134 Views
hi, guys.

I've installed Intel c++ compiler (Linux Version) under FC6 (even if it is not supported officailly) w/o any major problems.
My first code I tried to compile starts with:

#include
#include
#include
.....

The errors I got:

/opt/intel/cc/9.1.045/include/c++/xthreads(13): error: identifier "class" is undefined
class _Atomic_counter
^

/opt/intel/cc/9.1.045/include/c++/xthreads(14): error: expected a ";"
{
^

/opt/intel/cc/9.1.045/include/c++/xthreads(34): error: identifier "class" is undefined
class _Lockit
^
.... and so on (appox. 100 errors of such a type)

It seems to that Intel c++ compiler do not understand c++ language).

How to fix this problem? Does anyone know?

thanQ.

0 Kudos
4 Replies
JenniferJ
Moderator
1,134 Views

There're two different drivers for C and C++. In your case, you should use "icpc" to compile.

Before using "icpc", should run the iccvars.sh or iccvars.csh to set up the environment.

Jennifer

0 Kudos
ploeger__lennert
Beginner
1,134 Views
I am having the same kind of problem with MSVC 2010 Ultimate on Windows 7. What should I do?
0 Kudos
TimP
Honored Contributor III
1,134 Views
Check that you are compiling as C++ (e.g. by using a file name such as yourfile.cpp). Such a problem might be expected with a file named .c or .C (since you are on Windows).
0 Kudos
JenniferJ
Moderator
1,134 Views

or you can add /TP to tell the compiler to treat the file as a C++ code file.

Jennifer

0 Kudos
Reply