This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc and iostream - final issue


Hi Brian,

I did try all the items mentioned, and none have helped so far.  The error
states that I can get it into are:

1.  use full std:: qualifier in which case it cries at compile time about cout
not being in namespace std

2.  It complains at link time that cout is an undefined reference.  Still
without the std::

Just to address all issues in a list:

1.  Putting libraries at the end has not helped
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?
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/...

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++.

exact compilation line (bare in mind, its been through several iterations):
*******************************************
HdrPath
+=$(BLDVOL)\Allegro\RP306\RomPager\Includes;$(BLDVOL)\Allegro\RP306\Engine\Includes;.\hdr

SysHdrPath +=C:\cygwin\usr\include\mingw;
SysHdrPath +=C:\cygwin\usr\include\mingw\g++-3;
SysHdrPath +=C:\cygwin\usr\include\mingw\sys


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)
$(.SOURCE)
*******************************************


Linking (using clearcase make...so the %foreach turns out correctly)
*******************************************
g++
   -mno-cygwin  -g -o$(_Target)
   -nostdinc++
   #-nodefaultlibs
   -L/cygdrive/c/cygwin/lib/mingw      
   -Wl,--start-group
   %foreach Link in $(LinkFiles) 
   $(LinksPath)\$(Link) 
   %end
   -L/cygdrive/c/cygwin/lib/mingw   
   -lwsock32
   -lstdc++   
   -lgcc
   -Wl,--end-group
   -Wl,-L/cygdrive/c/cygwin/lib/mingw   
*******************************************

Thanks,

Yamin

Quoting Brian Ford <ford@vss.fsi.com>:

> On Fri, 31 Oct 2003 y2bismil@engmail.uwaterloo.ca wrote:
> 
> > Okay all,
> >
> > I think I've narrowed down the issue to a conflict with mingw.  This is
> mingw
> > installed via cygwin setup not the stand alone version.
> >
> Could you please repost your exact command line and the resulting output
> after following the suggestion here:
> 
> http://www.cygwin.com/ml/cygwin/2003-10/msg01820.html
> 
> and all these except the first one here:
> 
> http://www.cygwin.com/ml/cygwin/2003-10/msg01802.html
> 
> which was corrected here:
> 
> http://www.cygwin.com/ml/cygwin/2003-10/msg01814.html
> 
> Did you really follow and try all these?  We have not "seen" these
> results yet.
> 
> -- 
> 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/
> 




----------------------------------------
This mail sent through www.mywaterloo.ca

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]