|
|
Back to UserFriendly Strip Comments Index
| Help with Cygwin |
by romandas |
2003-08-24 22:58:46 |
Okay, I got it installed and set up, with all the libraries I want for coding C and C++ programs. However, when I try to run a simple 'Hello World' to test gcc, it comes back with an error.
Here's the error:
/cygdrive/c/Temp/ccS5859N.o(.text+0x2f):tut1.cpp: undefined reference to `std::cout'
/cygdrive/c/Temp/ccS5859N.o(.text+0x3c):tut1.cpp: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/cygdrive/c/Temp/ccS5859N.o(.text+0x65):tut1.cpp: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/cygdrive/c/Temp/ccS5859N.o(.text+0x80):tut1.cpp: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/cygdrive/c/Temp/ccS5859N.o(.eh_frame+0x11):tut1.cpp: undefined reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status
Here's the code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n";
}
Any guesses what's wrong? If I change the name of the file, I get a different error, so it can see the #include file just fine, even if it says it can't find the referred functions. Am I missing an #include for some file? This code is directly off the about.com C++ tutorial so I figured it should be fine. And heck, it's Hello World fercrissake :P
|
|
[ Reply ] |
|
What version of gcc? | by alter3d | 2003-08-24 23:03:21 |
|
Hmm.. that's weird.. | by romandas | 2003-08-24 23:26:27 |
|
Oh! I think I've got it! | by alter3d | 2003-08-24 23:36:16 |
|
Bingo! | by romandas | 2003-08-24 23:43:21 |
|
Heh... don't worry. | by alter3d | 2003-08-24 23:45:47 |
|
What sorts of things do you code usually? | by romandas | 2003-08-24 23:57:55 |
|
What do I code... hmm... :) | by alter3d | 2003-08-25 00:06:50 |
|
AFAIK, g++ just calls gcc | by nix | 2003-08-24 23:52:55 |
|
I thought so too, | by alter3d | 2003-08-24 23:55:24 |
|
|
[Todays Cartoon Discussion]
[News Index]
|
|