public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gcc and iostream
@ 2003-10-30 22:35 y2bismil
  2003-10-31  2:26 ` Brian Ford
  2003-10-31 10:00 ` Gerrit P. Haase
  0 siblings, 2 replies; 13+ messages in thread
From: y2bismil @ 2003-10-30 22:35 UTC (permalink / raw)
  To: cygwin

Hi all,

I'm having a linking problem with GCC and iostream.  I'm not sure if it has
anything to do with cygwin, so I'll check here.

I am using 
#include <iostream>
using namespace std;

Its a pretty large project.  First, all the sources and compiled into object
files using gcc.  Then to link, I've tried both gcc and g++.  Both times using
-lstdc++ as a paramter.  Yet, I always seem to get iostream errors like:

: undefined reference to `ostream::operator<<(char const*)
: undefined reference to `_cin'
: undefined reference to `_cout'
:undefined reference to `istream& operator>><int>(istream&, smanip<int> const&)'

Below is the output of gcc/g++ -print-search-dirs
**************************************************
install: /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/
programs:
=/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/:/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/:/usr/lib/gc
c-lib/i686-pc-cygwin/:/usr/lib/gcc/i686-pc-cygwin/3.3.1/:/usr/lib/gcc/i686-pc-cygwin/:/usr/lib/gcc-l
ib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/i686-pc-cygwin/3.3.1/:/usr/lib/gcc-lib/i686-p
c-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/
libraries:
=/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/:/usr/lib/gcc/i686-pc-cygwin/3.3.1/:/usr/lib/gcc-l
ib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/lib/i686-pc-cygwin/3.3.1/:/usr/lib/gcc-lib/i686-p
c-cygwin/3.3.1/../../../../i686-pc-cygwin/lib/:/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../i686-p
c-cygwin/3.3.1/:/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../:/lib/i686-pc-cygwin/3.3.1/:/lib/:/us
r/lib/i686-pc-cygwin/3.3.1/:/usr/lib/
************************************************
My compile line is:
gcc/g++
   -mno-cygwin  -g -o$(_Target)
   -LC:\cygwin\lib\mingw
   -Wl,--start-group
   -lwsock32
   -lstdc++   
   <files needed to be linked>
   -Wl,--end-group    

I doubt this is a code problem, though its always possible.  I think its some
setup option or something like that.

any ideas?  
Thanks,


Yamin

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream
  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
  1 sibling, 1 reply; 13+ messages in thread
From: Brian Ford @ 2003-10-31  2:26 UTC (permalink / raw)
  To: cygwin

I don't know if any of these will address your problem, but...

On Thu, 30 Oct 2003 y2bismil@engmail.uwaterloo.ca wrote:

> I am using
> #include <iostream>
> using namespace std;
>
I might reverse the order of those two, but I don't know if it matters.
I'm not a c++ person.

> Its a pretty large project.  First, all the sources and compiled into object
> files using gcc.  Then to link, I've tried both gcc and g++.
>
You should never compile or link c++ source files with gcc.  Use g++.

> Both times using -lstdc++ as a paramter.
>
If you use g++, as you should, this is not necessary.

> Yet, I always seem to get iostream errors like:
>
> : undefined reference to `ostream::operator<<(char const*)
> : undefined reference to `_cin'
> : undefined reference to `_cout'
> :undefined reference to `istream& operator>><int>(istream&, smanip<int> const&)'
>
Don't know.

> My compile line is:
> gcc/g++
>
g++
>    -mno-cygwin  -g -o$(_Target)
>    -LC:\cygwin\lib\mingw
>
Don't hand DOS paths to Cygwin utilities (ie. leave off the C:\).  And the
-mno-cygwin flag makes this redundant, so don't use it.

>    -Wl,--start-group
>    -lwsock32
>    -lstdc++
>
Again, using g++, omit this.

>    <files needed to be linked>
>    -Wl,--end-group
>
Let us know if you try all that and still have problems.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: gcc and iostream
  2003-10-31  2:26 ` Brian Ford
@ 2003-10-31  7:20   ` Gary R. Van Sickle
  0 siblings, 0 replies; 13+ messages in thread
From: Gary R. Van Sickle @ 2003-10-31  7:20 UTC (permalink / raw)
  To: cygwin

> > I am using
> > #include <iostream>
> > using namespace std;
> >
> I might reverse the order of those two, but I don't know if it matters.
> I'm not a c++ person.
>

No, he's got that right.  Putting the "using" cart before the "#include"ed horse
could conceivably cause problems.

--
Gary R. Van Sickle


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream
  2003-10-30 22:35 gcc and iostream y2bismil
  2003-10-31  2:26 ` Brian Ford
@ 2003-10-31 10:00 ` Gerrit P. Haase
  2003-10-31 16:22   ` y2bismil
  1 sibling, 1 reply; 13+ messages in thread
From: Gerrit P. Haase @ 2003-10-31 10:00 UTC (permalink / raw)
  To: y2bismil; +Cc: cygwin

Hallo y2bismil,

Am Donnerstag, 30. Oktober 2003 um 22:28 schriebst du:

> I'm having a linking problem with GCC and iostream.  I'm not sure if it has
> anything to do with cygwin, so I'll check here.

> I am using 
> #include <iostream>
> using namespace std;

> Its a pretty large project.  First, all the sources and compiled into object
> files using gcc.  Then to link, I've tried both gcc and g++.  Both times using
> -lstdc++ as a paramter.  Yet, I always seem to get iostream errors like:

> : undefined reference to `ostream::operator<<(char const*)
> : undefined reference to `_cin'
> : undefined reference to `_cout'
> :undefined reference to `istream& operator>><int>(istream&, smanip<int> const&)'

[...]

> My compile line is:
> gcc/g++
>    -mno-cygwin  -g -o$(_Target)
>    -LC:\cygwin\lib\mingw
>    -Wl,--start-group
>    -lwsock32
>    -lstdc++   
>    <files needed to be linked>
>    -Wl,--end-group    


Put the libraries to the end of the linkline:
 gcc/g++
    -mno-cygwin  -g -o$(_Target)
    -Wl,--start-group
    <files needed to be linked>
    -LC:\cygwin\lib\mingw
    -lwsock32
    -lstdc++
    -Wl,--end-group

And I'm not sure if this works with Cygwin gcc/ld: -LC:\cygwin\lib\mingw


Gerrit
-- 
=^..^=


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream
  2003-10-31 10:00 ` Gerrit P. Haase
@ 2003-10-31 16:22   ` y2bismil
  2003-10-31 17:00     ` y2bismil
  0 siblings, 1 reply; 13+ messages in thread
From: y2bismil @ 2003-10-31 16:22 UTC (permalink / raw)
  To: cygwin

Hi all,

Okay, I've replaced the using namespace std with std:: for each call to
cout/cin.  The error I got was interesting.  It seems cout is not declared in
namepace std.

error: `cout' undeclared in namespace `std'

Obviously something is up.  If anyone can think of anything, let me know.  The
only lead I'm tracing now is if the Tornado headers are somehow being pulled in.

Thanks all,

Yamin



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream
  2003-10-31 16:22   ` y2bismil
@ 2003-10-31 17:00     ` y2bismil
  2003-10-31 18:13       ` gcc and iostream - final issue y2bismil
  0 siblings, 1 reply; 13+ messages in thread
From: y2bismil @ 2003-10-31 17:00 UTC (permalink / raw)
  To: cygwin

Ah, okay,

running just the preprocessor on the file, This is what I get:

Nothing weird is being pulled in from other directories.  The iostream
references are as follows:

# 1 "/usr/include/c++/3.3.1/iostream" 1 3
# 43 "/usr/include/c++/3.3.1/iostream" 3
..
# 1 "/usr/include/c++/3.3.1/backward/iomanip.h" 1 3
# 31 "/usr/include/c++/3.3.1/backward/iomanip.h" 3
# 1 "/usr/include/c++/3.3.1/backward/backward_warning.h" 1 3
# 32 "/usr/include/c++/3.3.1/backward/iomanip.h" 2 3
# 1 "/usr/include/c++/3.3.1/backward/iostream.h" 1 3
# 34 "/usr/include/c++/3.3.1/backward/iostream.h" 3

This has me a bit concerned, and I'm looking at it.  Any ideas?

Thanks 

Yamin


Quoting y2bismil@engmail.uwaterloo.ca:

> Hi all,
> 
> Okay, I've replaced the using namespace std with std:: for each call to
> cout/cin.  The error I got was interesting.  It seems cout is not declared
> in
> namepace std.
> 
> error: `cout' undeclared in namespace `std'
> 
> Obviously something is up.  If anyone can think of anything, let me know. 
> The
> only lead I'm tracing now is if the Tornado headers are somehow being pulled
> in.
> 
> Thanks all,
> 
> Yamin
> 
> 
> 
> ----------------------------------------
> 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/
> 




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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream - final issue
  2003-10-31 17:00     ` y2bismil
@ 2003-10-31 18:13       ` y2bismil
  2003-10-31 18:39         ` Christopher Faylor
  2003-10-31 21:07         ` Brian Ford
  0 siblings, 2 replies; 13+ messages in thread
From: y2bismil @ 2003-10-31 18:13 UTC (permalink / raw)
  To: cygwin

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.

In general then, anyone know what the exact issues are regarding mingw and
cygwin.  I've googled, and come across a few things.  I've tried the option
-nodefaultlibs
, but then I got an insane amount of link errors, as I did not know ALL the libs
to include.  

Anyone have any ideas on what params/path to pass to g++ on both compiling and
linking stages?

Thanks,

Yamin

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream - final issue
  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
  1 sibling, 0 replies; 13+ messages in thread
From: Christopher Faylor @ 2003-10-31 18:39 UTC (permalink / raw)
  To: cygwin

On Fri, Oct 31, 2003 at 12:46:15PM -0500, y2bismil@engmail.uwaterloo.ca wrote:
>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.
>
>Anyone have any ideas on what params/path to pass to g++ on both compiling and
>linking stages?

"-mno-cygwin"

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream - final issue
  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
  1 sibling, 1 reply; 13+ messages in thread
From: Brian Ford @ 2003-10-31 21:07 UTC (permalink / raw)
  To: cygwin; +Cc: y2bismil

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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream - final issue
  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:24             ` gcc and iostream - final issue Brian Ford
  0 siblings, 2 replies; 13+ messages in thread
From: y2bismil @ 2003-10-31 21:34 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream - resolved
  2003-10-31 21:34           ` y2bismil
@ 2003-10-31 22:05             ` y2bismil
  2003-10-31 22:48               ` Brian Ford
  2003-10-31 22:24             ` gcc and iostream - final issue Brian Ford
  1 sibling, 1 reply; 13+ messages in thread
From: y2bismil @ 2003-10-31 22:05 UTC (permalink / raw)
  To: y2bismil; +Cc: cygwin

Hi all,

I got it resolved by doing the following:

1.  Used dos style names because (I don't think this was needed, but clearcase
paths...were not setup under the cygwin environment, so I just used the windows cmd.

2.  Only included SysHdrPath +=C:/cygwin/usr/include/mingw as the system path

3.  DID NOT USE -nostdinc++ in both compile/link
4.  used -mno-cygwin in both compile/link
5.  DID NOT USE -nodefaultlibs in link
6.  still linked with  -lwsock32 -lstdc++ -lgcc, but I think only lwsock32 is
needed.  But this is good enough for now.

In short, I think I ended up messing myself over. 
Thanks,


Yamin




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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream - final issue
  2003-10-31 21:34           ` y2bismil
  2003-10-31 22:05             ` gcc and iostream - resolved y2bismil
@ 2003-10-31 22:24             ` Brian Ford
  1 sibling, 0 replies; 13+ messages in thread
From: Brian Ford @ 2003-10-31 22:24 UTC (permalink / raw)
  To: cygwin; +Cc: y2bismil

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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc and iostream - resolved
  2003-10-31 22:05             ` gcc and iostream - resolved y2bismil
@ 2003-10-31 22:48               ` Brian Ford
  0 siblings, 0 replies; 13+ messages in thread
From: Brian Ford @ 2003-10-31 22:48 UTC (permalink / raw)
  To: y2bismil; +Cc: cygwin

On Fri, 31 Oct 2003 y2bismil@engmail.uwaterloo.ca wrote:

> I got it resolved by doing the following:
>
> 1.  Used dos style names because (I don't think this was needed, but clearcase
> paths...were not setup under the cygwin environment, so I just used the windows cmd.
>
Never feed DOS style paths to Cygwin's gcc/g++.

> 2.  Only included SysHdrPath +=C:/cygwin/usr/include/mingw as the
> system path
>
Don't do that either.

> 3.  DID NOT USE -nostdinc++ in both compile/link
> 4.  used -mno-cygwin in both compile/link
> 5.  DID NOT USE -nodefaultlibs in link
>
All good.

> 6.  still linked with  -lwsock32 -lstdc++ -lgcc, but I think only lwsock32 is
> needed.  But this is good enough for now.
>
Yes, only -lwsock32 is needed.

> In short, I think I ended up messing myself over.
>
Yes!  You're making this *way* too hard.  Just use -mno-cygwin and comple
away.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-10-31 21:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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             ` gcc and iostream - final issue Brian Ford

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