| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| NNTP-Posting-Date: | Tue, 26 Apr 2005 16:13:50 -0500 |
| Date: | Tue, 26 Apr 2005 17:13:55 -0400 |
| From: | Joe Wright <joewwright AT comcast DOT net> |
| User-Agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
| X-Accept-Language: | en-us, en |
| MIME-Version: | 1.0 |
| Newsgroups: | gnu.g++.help,comp.os.msdos.djgpp |
| Subject: | Re: Undeclared wstring/wcout in GCC under DJGPP/Cygwin |
| References: | <d4m153$a5e$1 AT ns DOT felk DOT cvut DOT cz> |
| In-Reply-To: | <d4m153$a5e$1@ns.felk.cvut.cz> |
| Message-ID: | <6tidnWhKULqTMvPfRVn-1g@comcast.com> |
| Lines: | 54 |
| NNTP-Posting-Host: | 69.143.13.12 |
| X-Trace: | sv3-bPDfMPtm3yauM0BUhvwiZx3SextGorEKuJrT+rIy6sNy7H4gDya1liNDM03drj9QJxtgY1BfGGMmlJb!94hEnUpTeLYA3VNh+s+3T4C1YEfuFSzr5RrRiLnZCRyJ3wUFfdQKVW2P8vwe |
| X-Complaints-To: | abuse AT comcast DOT net |
| X-DMCA-Complaints-To: | dmca AT comcast DOT net |
| X-Abuse-and-DMCA-Info: | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info: | Otherwise we will be unable to process your complaint properly |
| X-Postfilter: | 1.3.31 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
ing. Jan Chládek wrote:
> I need compile ANSI C++ source file under Windows XP.
> For some reasons I can't use MS Visual Studio, then I trying g++ port for
> Windows (DJGPP, CygWin).
> But I've problems with wide-characters operations, I think then it's maybe
> error of compiler's port for Windows.
>
> Simple sample a.cpp:
>
> #include <string>
> #include <iostream>
> using namespace std;
> int main (int argc, char * argv[]) {
> wstring x;
> wcout<<x;
> return 0;
> }
>
> I've got these error messages:
>
> 1) in DJGPP 2.03, gxx 3.4.3
> a.cpp: In function `int main(int, char**)':
> a.cpp:5: error: `wstring' undeclared (first use this function)
> a.cpp:5: error: (Each undeclared identifier is reported only once for each
> function it appears in.)
> a.cpp:5: error: expected `;' before "x"
> a.cpp:6: error: `wcout' undeclared (first use this function)
> a.cpp:6: error: `x' undeclared (first use this function)
>
> 2) in cygwin 1.5.13, g++ 3.3.3
> a.cpp: In function `int main(int, char**)':
> a.cpp:5: error: `wstring' undeclared (first use this function)
> a.cpp:5: error: (Each undeclared identifier is reported only once for each
> function it appears in.)
> a.cpp:5: error: parse error before `;' token
> a.cpp:6: error: `wcout' undeclared (first use this function)
> a.cpp:6: error: `x' undeclared (first use this function)
>
> 3) in RedHat Linux, g++ 3.2.3
> Compiled correctly.
>
> Do you somebody know how to compile sources with wide-character strings
> until g++ for Windows?
> Or exists any other free (full ANSI) C++ compiler for Windows?
>
> Thanks
The DJGPP and cygwin sessions indeed pointed out errors in your code.
Why do you think g++ on Redhat can get it right? If I were you, I would
fix the code.
--
Joe Wright mailto:joewwright AT comcast DOT net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |