Help!! VC++ Problems

This is a discussion on Help!! VC++ Problems within the C++ Programming forums, part of the General Programming Boards category; I'm trying to do a project and we have to implement the matrix library newmat. I put all the required ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    1

    Help!! VC++ Problems

    I'm trying to do a project and we have to implement the matrix library newmat. I put all the required files we were given into my VC98 subfolders. Now I getting 46 errors, essentially this block repeated 3 times:


    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(8 : error C2872: 'streambuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(89) : error C2872: 'streampos' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(89) : error C2872: 'streamoff' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(106) : error C2872: 'streambuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(107) : error C2872: 'filebuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(126) : error C2872: 'streambuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(127) : error C2872: 'filebuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(146) : error C2872: 'streambuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(147) : error C2872: 'filebuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(159) : error C2872: 'ios' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(159) : error C2872: 'ios' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(160) : error C2872: 'filebuf' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(161) : error C2872: 'ios' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(161) : error C2872: 'ios' : ambiguous symbol
    C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\fstream.h(162) : error C2872: 'filebuf' : ambiguous symbol


    I did some searching on google and some people had this problem when they had the lines "using namespace std" before a #include so I put all mine after the #include. I have namespace in 3 files:

    Twice like this:
    using namespace std;
    using namespace NEWMAT;

    And once like this:
    using namespace NEWMAT;

    Any idea what these errors mean?

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    I'm not famaliar with the matrix library your using, though if their are multiple definitions in different namespaces, this will help. You shouldn't dump entire namespaces like that unless if your refactoring old code to us namespaces. I'm used to writing std::cout << "hello world" << std::end etc., you can also put using directives at the top such as using std::cout;

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,852
    > I put all the required files we were given into my VC98 subfolders
    Bad move.

    Put them somewhere else, and configure the project search paths to include the location where you put them.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 03:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 06:35 AM
  3. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 01:17 PM
  4. makefile exported by vc 6.0 doesn't work
    By wow in forum Windows Programming
    Replies: 7
    Last Post: 03-24-2006, 04:20 PM
  5. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-2004, 09:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21