* C++ link problem on Windows 95 - 17.1 & 18
@ 1997-08-27 14:23 DGREGORY
0 siblings, 0 replies; only message in thread
From: DGREGORY @ 1997-08-27 14:23 UTC (permalink / raw)
To: gnu-win32(a)cygnus.com
I am having problems compiling C++ programs with versions 17.1 and 18
on Windows 95. I have tried this on two systems with beta 18 the same
results, and on one system I tried it with both 18 and 17.1.
I am trying to use beta 18 to learn C++, so please excuse any
terminology problems.
Is anyone using beta 18 to compile C++ on Windows 95?
The results:
C:\>gcc hello.cc
C:\tmp/cc0010001.o(.text+0x1e):hello.cc: undefined reference to `cout'
C:\tmp/cc0010001.o(.text+0x23):hello.cc: undefined reference to
`ostream::operator<<(char const *)'
I suspect that this is a linking issue, because if I execute:
gcc -c hello.cc
I get no error messages, and an object file is created (hello.o).
The program:
#include <iostream.h>
void main ()
{
cout << "Hello world!\n";
}
Additional information...
I have tried playing with all of the environment settings including
LIBRARY_PATH and nothing seems to work. I am able to compile a C
hello.c program using printf without any problems.
When I try to copy libg++.a to play around, I need to put the file
name in quotes, or the copy fails, so I think there is a possibilitty
that this may be a contributor to the problem.
I have tried linking the hello.o module with ld, but I can not seem to
successfully use the -l parameter to specify libg++.a
Any help will be greatly appreciated.
... Darwin
PS - I have checked the FAQ and the mailing list archive which showed
a few others having this problem, but no solution posted.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-08-27 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-27 14:23 C++ link problem on Windows 95 - 17.1 & 18 DGREGORY
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).