- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I hava problems compiling C++ programs which includes climits. The operating system is Debian Linux (64-bit), icc version is 12.0.4, gcc version is 4.3.2. The following test program does not compile with icpc (but it compiles with g++):
The error message:
/usr/include/limits.h(125): catastrophic error: cannot open source file "limits.h"
# include_next
^
compilation aborted for test.cpp (code 4)
Interestingly, when I use
I hava problems compiling C++ programs which includes climits. The operating system is Debian Linux (64-bit), icc version is 12.0.4, gcc version is 4.3.2. The following test program does not compile with icpc (but it compiles with g++):
#include
#include
int main()
{
std::cout << INT_MAX << "\\n";
return 0;
}
The error message:
/usr/include/limits.h(125): catastrophic error: cannot open source file "limits.h"
# include_next
^
compilation aborted for test.cpp (code 4)
Interestingly, when I use
#include
, instead of #include
, the test program compiles with icpc and runs correctly.Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i have compile your sample with icpc 12.0.4.20110427 version under openSUSE 12.1 M1 64 Bit linux
without any problems, i think its a OS or environment setting problem,
on openSUSE 12.1 the Intel ICC/ICPC Version 12.0.4.20110427 works without troubles with your sample
regards
Franz
i have compile your sample with icpc 12.0.4.20110427 version under openSUSE 12.1 M1 64 Bit linux
without any problems, i think its a OS or environment setting problem,
on openSUSE 12.1 the Intel ICC/ICPC Version 12.0.4.20110427 works without troubles with your sample
regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can also compiler the code in FC11 using icc 12.0.4.191. Could you please try compiling with gcc?
Om
Om
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, /* utilize and expand sys header */
same problem here: Ubuntu 10.04,g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3, icpc12.0.4 20110427
Compiling the small sample program with icpc gives the same error message. Compiling it with g++ works fine.
When I compile the sample with
icpc -Wall -I /opt/intel/composerxe/include
it works but on my real program I get then the warnings
/opt/intel/composerxe/include/math.h(19): warning #561: nonstandard preprocessing directive
# include_next /* utilize and expand sys header */
/opt/intel/composerxe/include/math.h(19): warning #561: nonstandard preprocessing directive # include_next Any ideas?
Cheers
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
it seems the problem is the compilervars_arch.sh script. When you look at the other scripts which were made for
tbb, ipp, mkl than you see that they set the CPATH to the corresponding include directory. The include path of the
compiler is not set. When I add
if [ -z "${CPATH}" ]; then
CPATH="${INSTALL_DIR}/compiler/include"; export CPATH
else
CPATH="${INSTALL_DIR}/compiler/include:$CPATH"; export CPATH
fi
if [ -z "${CPATH}" ]; then CPATH="${INSTALL_DIR}/compiler/include"; export CPATHelse CPATH="${INSTALL_DIR}/compiler/include:$CPATH"; export CPATHfi
to the
/opt/intel/composerxe-2011.4.191/pkg_bin/compilervars_arch.sh
script it seems everything is running fine.
Cheers
Patrick

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