473,705 Members | 7,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VC7.1: Compiler Error if include any STL headers (iostream, fstream, string, etc.)

I've just installed VS.NET 2003 on my Athlon XP 1800+. However I couldn't
get any project with STL includes to compile even if I create a new empty
project (and added #include <string>). It gave me a bunch of "missing ;"
errors. I did reinstall the whole thing a few times but it didn't work.

Anyone have any idea?

Thanks

c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(862) :
error C2143: syntax error : missing ';' before '<'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(935) :
see reference to class template instantiation
'std::istreambu f_iterator<_Ele m,_Traits>' being compiled
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(862) :
error C2238: unexpected token(s) preceding ';'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(863) :
error C2143: syntax error : missing ';' before '<'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(863) :
error C2238: unexpected token(s) preceding ';'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(866) :
error C2143: syntax error : missing ')' before '*'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(866) :
error C2143: syntax error : missing ';' before '*'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(866) :
error C2864: '_Sb' : only const static integral data members can be
initialized inside a class or struct
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(866) :
error C2501: 'std::istreambu f_iterator<_Ele m,_Traits>::_Sb ' : missing
storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(866) :
error C2143: syntax error : missing ';' before 'throw'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(866) :
error C2334: unexpected token(s) preceding ':'; skipping apparent function
body
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(871) :
error C2143: syntax error : missing ')' before '&'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(871) :
error C2143: syntax error : missing ';' before '&'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(871) :
error C2059: syntax error : ')'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(871) :
error C2143: syntax error : missing ';' before 'throw'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(871) :
error C2501: 'std::istreambu f_iterator<_Ele m,_Traits>::_Is tr' : missing
storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(871) :
error C2334: unexpected token(s) preceding ':'; skipping apparent function
body
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(932) :
error C2143: syntax error : missing ';' before '*'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\xutility(932) :
error C2501:

........

c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\streambuf(320 ) :
error C2146: syntax error : missing ';' before identifier 'xsputn'
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\streambuf(320 ) :
error C2433: 'std::basic_str eambuf<_Elem,_T raits>::streams ize' : 'virtual'
not permitted on data declarations
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\streambuf(320 ) :
error C2501: 'std::basic_str eambuf<_Elem,_T raits>::streams ize' : missing
storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\streambuf(320 ) :
fatal error C1003: error count exceeds 100; stopping compilation
Nov 17 '05 #1
1 7494
Minh wrote:
I've just installed VS.NET 2003 on my Athlon XP 1800+. However I
couldn't get any project with STL includes to compile even if I
create a new empty project (and added #include <string>). It gave me
a bunch of "missing ;" errors. I did reinstall the whole thing a few
times but it didn't work.

Anyone have any idea?


What did you name the source file you're trying to compile - is it .c or
..cpp? The compiler will assumes files named *.c are C not C++ - that could
be the cause of the errors you're seeing.

-cd
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1105
by: Patrick Coleman | last post by:
Hi, This may seem to be a basic question, but I keep getting the following error: main.cc:93: undefined reference to `AT_UrlParser::AT_UrlParser(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' line 93: AT_UrlParser qservice(service); I'm including a custom header file that defines AT_UrlParser.
6
19270
by: Zenon | last post by:
Folks, I cannot figure out why I am getting an error: Error E2303 EngineX.hpp 19: Type name expected. Here is my code. Can you please help? #ifndef EngineX__hpp #define EngineX__hpp #include<iostream> #include <cstring> #include <cmath>
4
4529
by: merlevo | last post by:
I am trying to set up the intel compiler. I have no trouble when I #include <stdio.h> but if I #include (iostream> using namespace std; I get an error "could not open source file "iostream" When I use gcc I don't get this error.
1
3185
by: Hafeez | last post by:
I am having real trouble compiling this code http://www.cs.wisc.edu/~vganti/birchcode/codeHier/AttrProj.tgz The attachment shows errors when compiled using the current version of g++ in a i386-pc-solaris2.9. Seeing reference to gcc-2.7.2 in the Makefile of the code, I downloaded it and compiled in my home directory. Then changed the referenes of LIBDIR and INCLUDES to this installation .and ran with g++ for 2.7.2 then there are still...
6
12537
by: c++newbie | last post by:
Hi all, I try to compile the following classes: main.cpp: #include <algorithm> #include <iostream> #include <fstream> #include <iterator>
8
3380
by: ambar.shome | last post by:
Hi, We are working on Solaris SunOS 5.8. We are using ifstream of iostream namespace. The snippet is given below: #include <iostream.h> #include <fstream.h> boolean readFile() { char readStr;
6
1738
by: Baloff | last post by:
Hello I wrote a code which is suppose to read a file which contains lines of double and prints it out. thanks for helping double.txt*************************************** 1.01 2.0301
1
2300
by: Gary Wessle | last post by:
Hi I need help in finding out why the error below, I am writing a through away program in C++ using debian/testing machine. thanks **************** error **************** fred@debian:~/myPrograms/common$ make clean; make; ./proj rm -rf *.o proj
2
2754
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string>
0
8768
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7895
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6606
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5933
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2491
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2083
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.