Stupid compiler errors

This is a discussion on Stupid compiler errors within the C++ Programming forums, part of the General Programming Boards category; Okay this is the deal i wrote this program and went to go compile it and it compiled and ran ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    5

    Stupid compiler errors

    Okay this is the deal i wrote this program and went to go compile it and it compiled and ran fine and then i went and changed a value and it gave me 102+ errors these errors were all on the library header files which shouldnt have errors being that they are included with the compiler and what not....so with that being i changed the value back to what it was and i still had these errors so i deleted the debug folder and rebuilt it and i still got these errors what is going on here?

    Here is exactly what it said:
    --------------------Configuration: lesson1 - Win32 Debug--------------------
    Compiling...
    LoadBSP.cpp
    c:\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
    c:\program files\microsoft visual studio\vc98\include\ios.h(219) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\streamb.h(90) : error C2872: 'streampos' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\streamb.h(90) : error C2872: 'streamoff' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\streamb.h(91) : error C2872: 'streampos' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\streamb.h(91) : error C2872: 'streampos' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(258) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(258) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(259) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(259) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(260) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(260) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(272) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(272) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(272) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(273) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ios.h(290) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(67) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(74) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(74) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(90) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(102) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(117) : error C2872: 'streampos' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(118) : error C2872: 'streamoff' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(119) : error C2872: 'streampos' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(126) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(132) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(139) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(140) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(140) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(140) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(142) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(143) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(145) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(146) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(148) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(149) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(150) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(152) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(153) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(155) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(156) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(157) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(159) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(161) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(162) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(167) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(169) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(169) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(170) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(170) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(175) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(175) : error C2872: 'istream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(177) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(177) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(178) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(178) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(179) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\istream.h(179) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(62) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(70) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(70) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(87) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(94) : error C2872: 'streampos' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(95) : error C2872: 'streamoff' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(96) : error C2872: 'streampos' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(101) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(107) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(112) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(113) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(113) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(113) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(115) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(116) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(118) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(119) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(121) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(123) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(124) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(126) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(127) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(133) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(135) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(135) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(136) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(136) : error C2872: 'streambuf' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(143) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(143) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(144) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(144) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(145) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(145) : error C2872: 'ostream' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(147) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(147) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(148) : error C2872: 'ios' : ambiguous symbol
    c:\program files\microsoft visual studio\vc98\include\ostream.h(148) : fatal error C1003: error count exceeds 100; stopping compilation
    Error executing cl.exe.

    lesson1.exe - 102 error(s), 0 warning(s)
    Last edited by ChrisEacrett; 11-30-2003 at 03:35 PM.

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    I'm not too good at guessing based on error messages, so can you post an example program?
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68
    please, not so long. It hurts the eyes, and they are all related. Just say something like : On compile, i recieved a list of 100 errors very similar to :
    Code:
    c:\program files\microsoft visual studio\vc98\include\ios.h(146) : error C2872: 'streambuf' : ambiguous symbol
    and the list was terminated with a message informing me that compile was stopped because of 100+ error count.

    in any case, try looking up MSDN for error C2872. And post some program like what JaWiB said - we arent hard-drive telepathics, only prelude is.
    Ph33r the sphericalCUBE

  4. #4
    Registered User
    Join Date
    Nov 2003
    Posts
    5
    g_Gamma is what i changed and then changed back

    Code:
    #include "LoadBSP.h"
    #include "main.h"
    #include <fstream.h>
    #include "LoadBMP.h"
    
    float g_Gamma = 15;
    GLuint BSPTexture2[100];
    int btex=0;
    
    MainBSP::CBSP()
    {
    	m_NumOfVerts = 0;
    	m_NumOfFaces = 0;
    	m_NumOfTextures = 0;
    
    	ObjectVerts = NULL;
    	ObjectFaces = NULL;
    }

  5. #5
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68
    that tells us a lot about where the variable is used...........

    btw, is this some kind of halflife map reader or mod?
    Ph33r the sphericalCUBE

  6. #6
    Registered User
    Join Date
    Nov 2003
    Posts
    5
    it is my own engine, and the variable is used to change the gamma value of the map

  7. #7
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68
    by the way, why are you using outdated header files? <fstream>, not <fstream.h>.

    And with that BSPTexture2 array, is that never going to exceed 100 in size?just as an unrealted question. If it might, try using vectors.

    I must congratulate you on your coding style though - mixed caps hurt the eyes much less than that ALL_CAPS_WITH_UNDERSCORES stuff.

    *dons flame retardant suit*
    Ph33r the sphericalCUBE

  8. #8
    Registered User
    Join Date
    Nov 2003
    Posts
    5
    well a lot of this was written quite some time ago and most of the code is very unorganized and what not, i just have to go through it all and fix it but i would like to make sure that i can compile it the way it is now first

    as far as the textures go it is set at 100 just because i dont really know why, just a number i threw in there

  9. #9
    Registered User
    Join Date
    Nov 2003
    Posts
    5
    well it now works what i did was:

    Code:
    #include "LoadBSP.h"
    #include "main.h"
    #include <fstream>
    #include "LoadBMP.h"
    using namespace std;

    but that still doesnt explain why it worked before....

  10. #10
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Those things were ambiguos because they were global. When you have simply ios, the compiler can't decide which. When you specify the std namespace, it knows which one to use. I'm surprised someone didn't catch that without any code .
    Do not make direct eye contact with me.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. stupid compiler
    By polonyman in forum C++ Programming
    Replies: 32
    Last Post: 09-11-2004, 11:04 AM
  2. Compiler Design... Anyone That Can Help!
    By ComputerNerd888 in forum C++ Programming
    Replies: 3
    Last Post: 09-27-2003, 09:48 AM
  3. Help me with these errors... :-(
    By major_small in forum C++ Programming
    Replies: 6
    Last Post: 09-07-2003, 08:18 PM
  4. Compiler errors when using libjpeg.
    By Nikanoru in forum C++ Programming
    Replies: 11
    Last Post: 08-07-2003, 06:46 AM
  5. stupid errors i got after compiling!! HELP ME!
    By Leeman_s in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2001, 04:13 PM

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