From: Brian Ford <ford@vss.fsi.com>
To: cygwin@cygwin.com
Cc: y2bismil@engmail.uwaterloo.ca
Subject: Re: gcc and iostream - final issue
Date: Fri, 31 Oct 2003 22:24:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.56.0310311515330.9896@eos> (raw)
In-Reply-To: <1067629896.3fa2bd48db2e8@www.nexusmail.uwaterloo.ca>
On Fri, 31 Oct 2003 y2bismil@engmail.uwaterloo.ca wrote:
> 1. Putting libraries at the end has not helped
>
You must always do this. This is the way linkers work.
> 2. I'm using g++ only now in both compile and link stages...Just out of
> curiousity though, isn't gcc supposed to 'call' g++ internally based on
> the file extension?
>
I believe it does when compiling with the -c switch. But, for linking,
you must use g++ as there is no file extension to base this on (.o).
> 3. In terms of cygwin handling C:\ type paths. It always seem to be able to,
> but I will try to fully qualify them with /cygdrive/c/...
>
Cygwin emulates Posix. Posix does not understand C:\. So, Cygwin's gcc
doesn't/shouldn't understand C:\.
> Just to clarify. I'm using G++, but the code makes some use of the conio
> functions which need then be linked with the mingw libraries. I figured that
> should only inlcude the mingw headers/libraries (including the stdc++ one),
> instead of the one provided in the other g++ dirs. Hence the use the
> attempted uses of -nocygwin and -nostdinc++.
>
Just -mno-cygwin is sufficient.
> exact compilation line (bare in mind, its been through several iterations):
> *******************************************
> HdrPath
> +=$(BLDVOL)\Allegro\RP306\RomPager\Includes;$(BLDVOL)\Allegro\RP306\Engine\Includes;.\hdr
>
I don't know what kind of a make system you are using, but I don't
recognize any of that syntax.
> SysHdrPath +=C:\cygwin\usr\include\mingw;
> SysHdrPath +=C:\cygwin\usr\include\mingw\g++-3;
> SysHdrPath +=C:\cygwin\usr\include\mingw\sys
>
None of this is needed with -mno-cygwin and should not be used.
> g++
> -c
> $(CC_FLAGS_386) $(CC_DBG_FLAG_386) $(CC_OPT_PCH) #bunch of -D..flags
> -D$(CC_DEFS_386,W -D)
> -I$(HdrPath:;= -I)
> -nostdinc++
> -isystem$(SysHdrPath:;= -isystem)
>
Don't do either of these.
> $(.SOURCE)
> *******************************************
>
> Linking (using clearcase make...so the %foreach turns out correctly)
> *******************************************
>
Ok, I don't know anything about how clearcase works.
> g++
> -mno-cygwin -g -o$(_Target)
> -nostdinc++
>
Again, don't use -nostdinc++.
> #-nodefaultlibs
> -L/cygdrive/c/cygwin/lib/mingw
>
Or this -L.
> -Wl,--start-group
> %foreach Link in $(LinkFiles)
> $(LinksPath)\$(Link)
> %end
> -L/cygdrive/c/cygwin/lib/mingw
>
Again, don't use this -L.
> -lwsock32
> -lstdc++
> -lgcc
>
Don't use either of these. g++ will handle them for you.
> -Wl,--end-group
> -Wl,-L/cygdrive/c/cygwin/lib/mingw
>
Not this -L either.
What I/we really wanted to see is the EXACT command line as it appears on
the console, and the output g++ sends to the console. NOT you clearcase
make stuff.
It is impossible to guess how clearcase, etc. gets from here to there.
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
prev parent reply other threads:[~2003-10-31 21:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-30 22:35 gcc and iostream y2bismil
2003-10-31 2:26 ` Brian Ford
2003-10-31 7:20 ` Gary R. Van Sickle
2003-10-31 10:00 ` Gerrit P. Haase
2003-10-31 16:22 ` y2bismil
2003-10-31 17:00 ` y2bismil
2003-10-31 18:13 ` gcc and iostream - final issue y2bismil
2003-10-31 18:39 ` Christopher Faylor
2003-10-31 21:07 ` Brian Ford
2003-10-31 21:34 ` y2bismil
2003-10-31 22:05 ` gcc and iostream - resolved y2bismil
2003-10-31 22:48 ` Brian Ford
2003-10-31 22:24 ` Brian Ford [this message]
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=Pine.GSO.4.56.0310311515330.9896@eos \
--to=ford@vss.fsi.com \
--cc=cygwin@cygwin.com \
--cc=y2bismil@engmail.uwaterloo.ca \
/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).