LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-15-2004, 07:18 PM   #1
ganda|f
LQ Newbie
 
Registered: Apr 2004
Location: Dallas, TX
Posts: 1

Rep: Reputation: 0
g++ under cygwin


I downloaded the cygwin install program and let it install all the g++ programs from the website.

I have it installed but when I try to run a program I'm getting some errors that I don't know how to fix.

I can run g++ filename.cpp and it seems to compile, but when I run gcc filename.cpp I am receiving the following lines..

/cygdrive/c/DOCUME~1/MICHAE~1.KAE/LOCALS~1/Temp/ccE3ED5T.o(.text+0x37):hello.cpp: undefined referenc
e to `std::cout'
/cygdrive/c/DOCUME~1/MICHAE~1.KAE/LOCALS~1/Temp/ccE3ED5T.o(.text+0x3c):hello.cpp: undefined referenc
e to `std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(s
td::basic_ostream<char, std::char_traits<char> >&, char const*)'
/cygdrive/c/DOCUME~1/MICHAE~1.KAE/LOCALS~1/Temp/ccE3ED5T.o(.text+0x44):hello.cpp: undefined referenc
e to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(st
d::basic_ostream<char, std::char_traits<char> >&)'
/cygdrive/c/DOCUME~1/MICHAE~1.KAE/LOCALS~1/Temp/ccE3ED5T.o(.text+0x4c):hello.cpp: undefined referenc
e to `std::basic_ostream<char, std::char_traits<char> >:perator<<(std::basic_ostream<char, std::ch
ar_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
/cygdrive/c/DOCUME~1/MICHAE~1.KAE/LOCALS~1/Temp/ccE3ED5T.o(.text+0x75):hello.cpp: undefined referenc
e to `std::ios_base::Init::Init[in-charge]()'
/cygdrive/c/DOCUME~1/MICHAE~1.KAE/LOCALS~1/Temp/ccE3ED5T.o(.text+0x90):hello.cpp: undefined referenc
e to `std::ios_base::Init::~Init [in-charge]()'
collect2: ld returned 1 exit status

If anyone can help me get this set up it would be greatly appreciated.
 
Old 04-15-2004, 09:46 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Why would you want to compile C++ source with
the C compiler, particularly since it works with the
C++ compiler anyway? :)

Those are linker-errors, btw...

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CygWin SpEcIeS Linux - General 1 02-17-2005 03:52 PM
cygwin windlamf Linux - Software 4 11-23-2004 06:47 AM
help with cygwin Devbmx Linux - Newbie 19 09-24-2004 11:45 AM
Cygwin anyone?? vickr1z Programming 1 09-23-2004 02:13 PM
cygwin help JROCK1980 Linux - Software 0 02-14-2004 03:47 AM


All times are GMT -5. The time now is 03:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration