From: Inferno <esheesle@bcpl.net>
To: help-gcc@gnu.org
Subject: Re: cygnus
Date: Wed, 03 Nov 1999 18:41:00 -0000 [thread overview]
Message-ID: <3820F182.B96D7175@bcpl.net> (raw)
In-Reply-To: <7vq8au$131a$1@news.doit.wisc.edu>
I have followed your instructions on how to get mingw libraries and compile c++
apps. I tried to compile and i am still getting errors. My program is:
#include <iostream.h>
void main()
{
cout << "Test" << endl;
}
and the command lines and errors i am getting are as follows:
# gcc -c -mno-cygwin -I/usr/local/mingw/include test.cpp
# gcc -o test -mno-cygwin -L/usr/local/mingw/lib test.o
test.o(.text+0x17):test.cpp: undefined reference to `endl(ostream &)'
test.o(.text+0x24):test.cpp: undefined reference to `cout'
test.o(.text+0x29):test.cpp: undefined reference to `ostream::operator<<(char
const *)'
/H-i586-CYGWIN32/lib/gcc-lib/i586-cygwin32/2.95.1/libgcc.a(_eh.o): In function
`_eh_rtime_match':
/d/cygnus/cygwin-b20/root/gcc-2.95.1/obj/gcc/../../gcc/libgcc2.c(.text+0x385):
undefined reference t
o `_impure_ptr'
collect2: ld returned 1 exit status
#
Any ideas? I have searched through the faq etc. on cygnus site but haven't
found my exact problem. It is a simple enough program and all files are in the
right place. the mingw-extra file was extracted and i copied the files to the
/usr/local/mingw/lib and include folders.
Thanks,
Inferno
Mumit Khan wrote:
> In article < 3820A2E3.D05423EA@bcpl.net >, Inferno <esheesle@bcpl.net> wrote:
> >I am trying to compile some basic console apps using gcc's c++. i would
> >like to be able to run the apps without the cygwin.dll file. I have
> >tried using the -mno-cygwin switch when compiling but it doesn't seem to
> >work. Any ideas?
>
> And your problem is???
>
> First of all, check with Cygwin mailing list or check the online archives
> to see if your problem has been discussed or not (chances are that it
> has, and many many times over!).
>
> http://sourceware.cygnus.com/cygwin/
>
> Then again check my mno-cygwin-howto:
>
> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/#mno-cygwin
>
> Regards,
> Mumit
--
"Life is the whim of several billion cells to be you for a while."
--Inferno
WARNING: multiple messages have this Message-ID
From: Inferno <esheesle@bcpl.net>
To: help-gcc@gnu.org
Subject: Re: cygnus
Date: Tue, 30 Nov 1999 23:28:00 -0000 [thread overview]
Message-ID: <3820F182.B96D7175@bcpl.net> (raw)
Message-ID: <19991130232800.ipg5N0iRxZTQaLVBm9h5PzoxPkR-vCp903NBk33h1sI@z> (raw)
In-Reply-To: <7vq8au$131a$1@news.doit.wisc.edu>
I have followed your instructions on how to get mingw libraries and compile c++
apps. I tried to compile and i am still getting errors. My program is:
#include <iostream.h>
void main()
{
cout << "Test" << endl;
}
and the command lines and errors i am getting are as follows:
# gcc -c -mno-cygwin -I/usr/local/mingw/include test.cpp
# gcc -o test -mno-cygwin -L/usr/local/mingw/lib test.o
test.o(.text+0x17):test.cpp: undefined reference to `endl(ostream &)'
test.o(.text+0x24):test.cpp: undefined reference to `cout'
test.o(.text+0x29):test.cpp: undefined reference to `ostream::operator<<(char
const *)'
/H-i586-CYGWIN32/lib/gcc-lib/i586-cygwin32/2.95.1/libgcc.a(_eh.o): In function
`_eh_rtime_match':
/d/cygnus/cygwin-b20/root/gcc-2.95.1/obj/gcc/../../gcc/libgcc2.c(.text+0x385):
undefined reference t
o `_impure_ptr'
collect2: ld returned 1 exit status
#
Any ideas? I have searched through the faq etc. on cygnus site but haven't
found my exact problem. It is a simple enough program and all files are in the
right place. the mingw-extra file was extracted and i copied the files to the
/usr/local/mingw/lib and include folders.
Thanks,
Inferno
Mumit Khan wrote:
> In article < 3820A2E3.D05423EA@bcpl.net >, Inferno <esheesle@bcpl.net> wrote:
> >I am trying to compile some basic console apps using gcc's c++. i would
> >like to be able to run the apps without the cygwin.dll file. I have
> >tried using the -mno-cygwin switch when compiling but it doesn't seem to
> >work. Any ideas?
>
> And your problem is???
>
> First of all, check with Cygwin mailing list or check the online archives
> to see if your problem has been discussed or not (chances are that it
> has, and many many times over!).
>
> http://sourceware.cygnus.com/cygwin/
>
> Then again check my mno-cygwin-howto:
>
> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/#mno-cygwin
>
> Regards,
> Mumit
--
"Life is the whim of several billion cells to be you for a while."
--Inferno
next prev parent reply other threads:[~1999-11-03 18:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-03 13:03 cygnus Inferno
1999-11-03 13:12 ` cygnus Mumit Khan
1999-11-03 18:41 ` Inferno [this message]
1999-11-03 23:39 ` cygnus Martin Kahlert
1999-11-04 13:30 ` cygnus Inferno
1999-11-30 23:28 ` cygnus Inferno
1999-11-30 23:28 ` cygnus Martin Kahlert
1999-11-30 23:28 ` cygnus Inferno
1999-11-30 23:28 ` cygnus Mumit Khan
1999-11-30 23:28 ` cygnus Inferno
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=3820F182.B96D7175@bcpl.net \
--to=esheesle@bcpl.net \
--cc=help-gcc@gnu.org \
/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).