Hi,

I have some code in a different directory which compiles fine as a console
window project. I wish to use the same source code files in my win32
application that uses mfc so I simply added them using
project->addtoproject->add files. When I compile though it says it cannot
find these files. I tried making a copy of all the source files I wanted
and placed them in the same directory as the win32 project directory and it
came up with all these errors when I did an include statement on one of the
files:

:\program files\microsoft visual studio\vc98\include\ios.h(146) : error
C2872: 'streambuf' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\ios.h(159) : error
C2872: 'ostream' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\ios.h(159) : error
C2872: 'ostream' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\ios.h(160) : error
C2872: 'ostream' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\ios.h(180) : error
C2872: 'streambuf' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\ios.h(207) : error
C2872: 'streambuf' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\ios.h(210) : error
C2872: 'streambuf' : ambiguous symbol

There are many more, 102, before the compiler bailed out. What I am asking
for seems like a regular use of VC++ so do I need to configure anything? My
preferred situation is to keep the source files from the console app in
their original directory so I dont have inconsistent copies.

Thanks for your help in advance.

RE: VC 6.0 compile errors by anonymous

anonymous
Wed Mar 03 10:31:09 CST 2004

Hi Jason

It seems you are mixing stl-iostream with old-iostream lib

The following code results in the same errors you described above

*********************************
#include <iostream

using namespace std
#include <iostream.h

void main (){
**********************************

Regards,
Ivo
----- Jason wrote: ----

Hi

I have some code in a different directory which compiles fine as a consol
window project. I wish to use the same source code files in my win3
application that uses mfc so I simply added them usin
project->addtoproject->add files. When I compile though it says it canno
find these files. I tried making a copy of all the source files I wante
and placed them in the same directory as the win32 project directory and i
came up with all these errors when I did an include statement on one of th
files

:\program files\microsoft visual studio\vc98\include\ios.h(146) : erro
C2872: 'streambuf' : ambiguous symbo
c:\program files\microsoft visual studio\vc98\include\ios.h(159) : erro
C2872: 'ostream' : ambiguous symbo
c:\program files\microsoft visual studio\vc98\include\ios.h(159) : erro
C2872: 'ostream' : ambiguous symbo
c:\program files\microsoft visual studio\vc98\include\ios.h(160) : erro
C2872: 'ostream' : ambiguous symbo
c:\program files\microsoft visual studio\vc98\include\ios.h(180) : erro
C2872: 'streambuf' : ambiguous symbo
c:\program files\microsoft visual studio\vc98\include\ios.h(207) : erro
C2872: 'streambuf' : ambiguous symbo
c:\program files\microsoft visual studio\vc98\include\ios.h(210) : erro
C2872: 'streambuf' : ambiguous symbo

There are many more, 102, before the compiler bailed out. What I am askin
for seems like a regular use of VC++ so do I need to configure anything? M
preferred situation is to keep the source files from the console app i
their original directory so I dont have inconsistent copies

Thanks for your help in advance




Re: VC 6.0 compile errors by Jason

Jason
Wed Mar 03 11:05:00 CST 2004


"Ivo" <anonymous@discussions.microsoft.com> wrote in message
news:E302F184-0C59-460E-AE2F-C9DC172CC67F@microsoft.com...
> Hi Jason,
>
> It seems you are mixing stl-iostream with old-iostream lib:
>
> The following code results in the same errors you described above:
>
> **********************************
> #include <iostream>
>
> using namespace std;
> #include <iostream.h>
>
> void main (){}
> ***********************************
>
> Regards,
> Ivo


Thanjsk I just tried removing a <strstrea.h> from my new app and it worked.