First time compile problems

First time compile problems

Hello all, I'm new here. I'm pretty much new to Linux in general as well, but I've done alot of programming in my time.

I've installed the Linux Compiler onto a Slackware 8.0 distro, but when I try and compile the simple Hello World as suggested I get a load of errors relating various files.

The first error is in reference to line 9 of include/exception: error: identifer "class" is undefined.

There are various other erros refering to expected ")" and ";".

I'm at a complete loss, does anyone have any ideas?

Thanks in advance.

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello eoinoc,
Please give more info, at least the command you have used
to compile this test.

Here are my comments -
I think the file extension is ".c" or you are
using a C compiler (for eg. icc/gcc). Try using a C++
compiler (icpc/g++) or change the file extension to

I hope this will help.


I just followed the Getting started guide.

int main() {
std::cout << ?Hello World !? << std::endl;
return 0; }

Compile hello.C :
icc hello.C ?o hello

Could the problem lie somewhere in my setup. To install the rpm I used slackware rpm2tgz and installed it that way. The rpm failed due to missing dependences.

Most likely the problem lies there somewhere, but since slackware isn't an rpm based distro I imagine it actually has alot of the dependences just that the installer can't tell.

Is there anyway to find what I may actually be missing. Or has anyone else here installed it on slackware before who did things differently.

Please try this - rename hello.C to hello.cpp and compile
it again.

Sorry to say, But I have no idea about installation of
Intel compiler on slackware.


The problem lies in the quotes being used in this code for "Hello World !" string. If we copy it straight away from the Getting Started guide to the vi/emacs editor we see different quotes from the one used in a C/C++ program.

Just rewrite the quotes in vi/emacs editor after copying the program.

Hello again, sorry it took a while to get back to ye. Thanks to everyone who helped solve the problem.

Ultimatly renameing the file to hello.cpp worked.

Thanks again.

Leave a Comment

Please sign in to add a comment. Not a member? Join today