RE: VC 6.0 compile errors

From: Ivo (anonymous_at_discussions.microsoft.com)
Date: 03/03/04


Date: Wed, 3 Mar 2004 08:31:09 -0800

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



Relevant Pages

  • RE: portupgrade -a
    ... use that thread for any replies. ... Regards, ... >ports at one time is a bad idea? ... >Source files are located. ...
    (freebsd-newbies)
  • Re: Adding a control variable
    ... The Add-Variable wizard parses the source files to figure out where to ... and caused the parser to break. ... >> Regards, ...
    (microsoft.public.vc.mfc)
  • Re: How to insert ResourceFile into Driver,...
    ... Best regards ... Write the .RC file (possibly via MSVC++ IDE, then edit it by hand to ... and list among all other source files in SOURCES. ...
    (microsoft.public.development.device.drivers)
  • Re: Deloying an ASP site
    ... and copy the files to a virtual folder on the target ... you may delete the source files if you want ... >I have developed an SP.NET v1.1 application on my development machine. ...
    (microsoft.public.dotnet.framework.aspnet)