public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Dave Braze <davebraze@netscape.net>
To: <cygwin@sourceware.cygnus.com>
Subject: No Subject
Date: Sun, 28 Mar 1999 16:14:00 -0000	[thread overview]
Message-ID: <19990329001431.15887.qmail@www0b.netaddress.usa.net> (raw)

I am having problems compiling C++ programs with b20.1 on Windows 95 sr2. 
Since I am trying to use cygwin to learn C++ and unix style tools both, I 
don't have a good handle on the relevant terminology, but here it is.

I can't compile a simple "hello world" program. Here it is:

     #include  <iostream>

     int main()
     {
       std::cout << "Hello world!\n";
       exit(0);
     }

I get an error like this (sorry for the long line):

c:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\collect2.exe
-o hello.exe -s
c:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib\crt0.o
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib
-L\cygnus\cygwin-b20\H-i586-cygwin32\lib\gcc-lib\i586-cygwin32\egcs-2.91.57
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib
-L\cygnus\cygwin-b20\H-i586-cygwin32\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..
hello.o -lgcc -lcygwin -lkernel32 -ladvapi32 -lshell32 -lgcc
hello.o(.text+0x1e):hello.cc: undefined reference to `cout'
hello.o(.text+0x23):hello.cc: undefined reference to `ostream::operator<<(char
const *)'
collect2: ld returned 1 exit status
make: *** [hello.exe] Error 1

Incidently I have no problem compiling a 'c'  version of "hello world". It
seems like the problem has to do with linking to the c++  libraries, but I'm
not sure where the problem might be in my installation. When I installed
cygwin I accepted the default install directory. Also, the same error occurs
whether I  use gcc from the command line, or use a trivial make file. I can't
imagine that this should cause a problem, but I do have a version of djgpp
installed on my system (poverty of imagination?). 

In any event, all help will be very much appreciated.

-Dave Braze


____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com .

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

WARNING: multiple messages have this Message-ID
From: Dave Braze <davebraze@netscape.net>
To: <cygwin@sourceware.cygnus.com>
Subject: No Subject
Date: Wed, 31 Mar 1999 19:45:00 -0000	[thread overview]
Message-ID: <19990329001431.15887.qmail@www0b.netaddress.usa.net> (raw)
Message-ID: <19990331194500.HuOrkHI8EE_o7NxVYHlHaYvTuxMWRvgSKBVplCk8W-U@z> (raw)

I am having problems compiling C++ programs with b20.1 on Windows 95 sr2. 
Since I am trying to use cygwin to learn C++ and unix style tools both, I 
don't have a good handle on the relevant terminology, but here it is.

I can't compile a simple "hello world" program. Here it is:

     #include  <iostream>

     int main()
     {
       std::cout << "Hello world!\n";
       exit(0);
     }

I get an error like this (sorry for the long line):

c:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\collect2.exe
-o hello.exe -s
c:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib\crt0.o
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib
-L\cygnus\cygwin-b20\H-i586-cygwin32\lib\gcc-lib\i586-cygwin32\egcs-2.91.57
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib
-L\cygnus\cygwin-b20\H-i586-cygwin32\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib
-Lc:\CYGNUS\CYGWIN-B20\H-I586-CYGWIN32\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..
hello.o -lgcc -lcygwin -lkernel32 -ladvapi32 -lshell32 -lgcc
hello.o(.text+0x1e):hello.cc: undefined reference to `cout'
hello.o(.text+0x23):hello.cc: undefined reference to `ostream::operator<<(char
const *)'
collect2: ld returned 1 exit status
make: *** [hello.exe] Error 1

Incidently I have no problem compiling a 'c'  version of "hello world". It
seems like the problem has to do with linking to the c++  libraries, but I'm
not sure where the problem might be in my installation. When I installed
cygwin I accepted the default install directory. Also, the same error occurs
whether I  use gcc from the command line, or use a trivial make file. I can't
imagine that this should cause a problem, but I do have a version of djgpp
installed on my system (poverty of imagination?). 

In any event, all help will be very much appreciated.

-Dave Braze


____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com .

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


             reply	other threads:[~1999-03-28 16:14 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-28 16:14 Dave Braze [this message]
1999-03-28 17:03 ` Rick Rankin
1999-03-31 19:45   ` RE: Rick Rankin
1999-03-31 19:45 ` No Subject Dave Braze
  -- strict thread matches above, loose matches on Subject: below --
1999-05-14 10:57 Araujo, Isaque G.
1999-05-31 21:10 ` Araujo, Isaque G.
1999-04-30 18:32 cygwin-unsubscribe
1999-04-30 18:32 cygwin-unsubscribe
1999-04-30 18:32 
1999-04-30 18:32 cygwin-unsubscribe
1999-04-30 18:32 
1999-04-30 18:32 cygwin-unsubscribe
1999-04-30 18:32 cygwin-unsubscribe
1999-03-31 19:45 cygwin-unsubscribe
1999-03-31 19:45 cygwin-unsubscribe
1999-03-22  1:50 Ace Scir
1999-03-31 19:45 ` Ace Scir
1999-03-02  8:04 Anjlica Malla
1999-03-31 19:45 ` Anjlica Malla
1999-03-01  8:21 John Collins
1999-03-31 19:45 ` John Collins
1999-02-28 23:02 fortinj
1999-02-28 23:02 cygwin-unsubscribe
1999-02-28 23:02 
1999-02-28 23:02 cygwin-unsubscribe
1999-02-28 23:02 cygwin-unsubscribe
1999-02-28 23:02 cygwin-unsubscribe
1999-02-28 23:02 cygwin-unsubscribe
1999-02-28 23:02 cygwin-unsubscribe
1999-02-05  1:43 Jean-Marc BOUCHER
1999-02-28 23:02 ` Jean-Marc BOUCHER
1998-12-25 12:48 Jhmorris
1998-12-01 17:48 Peng Weicheng
1998-11-30 18:35 Jack A Walker
1998-12-01 18:16 ` Mumit Khan
1998-11-23 12:41 Ugo Matrangolo
1998-11-24 21:59 ` Mumit Khan
1998-11-24 21:59 ` Xiaomao Xiao
1998-11-20 11:30 John R. Murray
1998-11-04 22:40 Keith Carscadden
1998-10-23  6:03 joz
1998-10-14  2:27 Emmanuel Bompard
1998-10-08  9:39 stephen_chan
1998-09-26 13:38 Charles Granderson
1998-09-29  2:36 ` Jeffrey Russell Horner
1998-08-15  2:26 anangsa
1998-05-31 17:25 Jeremy Ekers
1998-05-27  2:28 Gilbert Mak
1998-05-21 13:47 gnu-win32-request
1998-05-17 21:40 Abdul razak
1998-05-15  2:45 groeskens
1998-04-21  8:18 Pavel Tzekov
1998-02-09 13:06 lib-www on Win95/cygwin32 - (some) success! James G. Stallings II
1998-02-10  6:06 ` No Subject Jerome Gay
1998-02-03  3:05 Keith_Graham/Commetrex
1998-01-26 12:05 DHARWADA SUDHAKAR
1998-01-21 22:08 Bruce N. Hunsaker
1998-01-15 15:16 Daniyal Syed
1997-12-29  3:03 Peter Boncz
1997-11-18 12:51 Len Langsdorf
1997-11-17  9:50 Capron, Craig W
1997-10-24 13:18 cmeis
1997-10-17  2:59 mjiinas
1997-10-04 18:46 Tomcat
1997-09-30 19:03 Hyung Kuk Kang
1997-09-26 17:34 Xiang Zhiqiang
1997-09-18 10:13 Eugene.Bregman
1997-08-31 13:43 Felix Abundiz Charles
1997-08-29  3:25 ROHITVERMA
1997-08-16 20:30 IGnatius T Foobar
1997-07-29 17:44 Ismael Jurado
1997-07-18  1:37 ycdtosa
1997-07-17  6:00 Lionel Boy
     [not found] <33C62C17.4AAC@cyberalink.com.au>
1997-07-11  6:24 ` Jacobson
1997-06-27 16:55 Jeff Solomon
1997-06-05 18:47 John Cerney
1997-04-26 12:35 Sergio.Valle
1997-04-05 17:28 gnu-win32-request
1997-04-01 19:23 SLeBas
1997-03-28 13:27 Hiren Desai
1997-03-31 11:05 ` John R. Dennis
1997-03-06 22:02 A. Phillip Smith
1997-02-28  5:34 news
1997-02-28  4:40 news
1997-02-28  3:50 news
1997-02-04  5:13 operator
1997-02-04  5:10 operator

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990329001431.15887.qmail@www0b.netaddress.usa.net \
    --to=davebraze@netscape.net \
    --cc=cygwin@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).