Jan-Benedict Glaw wrote:

On Tue, 2004-11-23 21:40:52 +0000, michael <[EMAIL PROTECTED]>
wrote in message <[EMAIL PROTECTED]>:


[EMAIL PROTECTED]:/tmp$ cat sizes.cpp
#include <iostream>

using namespace std;

int main() {
cout << sizeof(char) << "\n";
cout << sizeof(int) << "\n";
cout << sizeof(float) << "\n";
cout << sizeof(double) << "\n";
}
[EMAIL PROTECTED]:/tmp$ g++ sizes.cpp
[EMAIL PROTECTED]:/tmp$ gcc sizes.cpp
/tmp/ccmtmIBv.o(.text+0x1b): In function `main':
: undefined reference to `std::cout'


[...]

You shouldn't expect a C++ program to link without the stdc++ library.


I just need this compiler up and working for a package I need to evaluate so any help would be most welcome. Thanks, Michael



Your program is written in C++. So why do you expect gcc (which is a C compiler) to compile it? Would you expect a Pascal compiler to build a Fortran program? So if you need to build C++ code, use a C++ compiler, like g++.

MfG, JBG

d'oh - i must be asleep today since I
a) assumed gcc was like icc and was both C & C++
b) thus misread the combined gcc/g++ man page's first line
c) should have known the difference!

Anyway, it's obviously a dead end in trying to solve the actual problem... (getting a working installation of Intel icc (for C++) on Debian)

cheers, michael



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to