- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
".cpp".
I hope this will help.
Regards,
CP
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
".cpp".
I hope this will help.
Regards,
CP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just followed the Getting started guide.
#include
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.
#include
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
CP
it again.
Sorry to say, But I have no idea about installation of
Intel compiler on slackware.
CP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Ultimatly renameing the file to hello.cpp worked.
Thanks again.
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