Welcome, Guest. Please login or register.

Author Topic: iostream.o probs (cout & cin)  (Read 1501 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline jaokimTopic starter

  • Full Member
  • ***
  • Join Date: Jun 2002
  • Posts: 205
    • Show only replies by jaokim
iostream.o probs (cout & cin)
« on: October 25, 2003, 11:25:32 AM »
When trying to compile a C++-prog with cout and cin, the compiler complains of an undefined reference to cout when linking my prog.
So, the question is. Where can these be found? Is there an env-variabel to set for this to be found?

On the miggy I'm using geekgadgets.
On my linux machine there's debian running (AOne).
They both produce the exact same error, which actually is rather funny.

The error:
gcc test.cpp -o test
 /tmp/ccdPTEKu.o(.text+0x26): In function `main':
: undefined reference to `cout'
and so on...

So, on miggy-side: What package, and what env to set?
And on debian: apt-get install what?
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show only replies by Kronos
    • http://www.SteamDraw.de
Re: iostream.o probs (cout & cin)
« Reply #1 on: October 25, 2003, 11:28:33 AM »
Never used streams myself,  but useing "g++" instead of "gcc" might help
(it will definitly do no harm  ;-)  )
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline jaokimTopic starter

  • Full Member
  • ***
  • Join Date: Jun 2002
  • Posts: 205
    • Show only replies by jaokim
Re: iostream.o probs (cout & cin)
« Reply #2 on: October 25, 2003, 11:31:17 AM »
Yep! That's it, I was just trying to delete my embarrassing post when I found the answer myself...  :oops:

It's not easy solving problems when it's late, tried it last night, just to see if the compiler worked, and well, it didn't...