[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
Frank Damgaard <sslug@sslug> skrev den 09-May-01: > Jeg har nu ikke været ude for dette problem, c++ std. biblioteket > bør automatisk være med, hvis man ikke har sat andre forkerte > options på oversætter/linker eller glemt include filer. Glemte include filer giver ikke linkerfejl; de ukendte symboler bliver fanget af compileren. gcc linker ikke automatisk med libstdc++, men g++ gør: sslug@sslug and]$ cat test.cc #include <iostream> int main() { cout << "hej verden" << endl; } sslug@sslug and]$ g++ test.cc -o test sslug@sslug and]$ gcc test.cc -o test /tmp/ccYXfunR.o: In function `main': /tmp/ccYXfunR.o(.text+0xa): undefined reference to `endl(ostream &)' /tmp/ccYXfunR.o(.text+0x17): undefined reference to `cout' /tmp/ccYXfunR.o(.text+0x1c): undefined reference to `ostream::operator<<(char const *)' /tmp/ccYXfunR.o(.text+0x27): undefined reference to `ostream::operator<<(ostream &(*)(ostream &))' collect2: ld returned 1 exit status sslug@sslug and]$ -- Stor hilsen -- Anders
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |